From e08ef6afbe47a2ae00b3e614e3a41c886f64c067 Mon Sep 17 00:00:00 2001 From: Wenming Liu Date: Fri, 11 Oct 2024 15:12:05 +0800 Subject: [PATCH] Enable-WriteCore-feature-for-securitycenter (#46503) --- .../CHANGELOG.md | 2 + ...ceManager.SecurityCenter.netstandard2.0.cs | 300 ++++++++++++++++++ .../assets.json | 2 +- ...plicationControlGroupData.Serialization.cs | 47 +-- ...ptiveNetworkHardeningData.Serialization.cs | 47 +-- ...reatProtectionSettingData.Serialization.cs | 47 +-- ...toProvisioningSettingData.Serialization.cs | 47 +-- .../ComplianceResultData.Serialization.cs | 47 +-- ...mAssessmentAutomationData.Serialization.cs | 47 +-- ...EntityStoreAssignmentData.Serialization.cs | 47 +-- ...nderForStorageSettingData.Serialization.cs | 47 +-- .../DevOpsConfigurationData.Serialization.cs | 47 +-- .../Generated/DevOpsOrgData.Serialization.cs | 47 +-- .../DevOpsProjectData.Serialization.cs | 47 +-- .../DevOpsRepositoryData.Serialization.cs | 47 +-- .../DeviceSecurityGroupData.Serialization.cs | 47 +-- .../GovernanceAssignmentData.Serialization.cs | 47 +-- .../GovernanceRuleData.Serialization.cs | 47 +-- ...curityAggregatedAlertData.Serialization.cs | 47 +-- ...regatedRecommendationData.Serialization.cs | 47 +-- ...olutionAnalyticsModelData.Serialization.cs | 47 +-- .../IotSecuritySolutionData.Serialization.cs | 60 +--- ...itNetworkAccessPolicyData.Serialization.cs | 47 +-- ...dExternalSecuritySolution.Serialization.cs | 61 +--- .../AadSolutionProperties.Serialization.cs | 27 +- .../ActionableRemediation.Serialization.cs | 11 +- ...nectionsNotInAllowedRange.Serialization.cs | 47 +-- ...eApplicationControlGroups.Serialization.cs | 11 +- ...cationControlIssueSummary.Serialization.cs | 11 +- ...rkHardeningEnforceContent.Serialization.cs | 11 +- ...tiveNetworkHardeningsList.Serialization.cs | 11 +- ...ionalWorkspacesProperties.Serialization.cs | 11 +- .../Models/AlertList.Serialization.cs | 11 +- ...lertsSuppressionRulesList.Serialization.cs | 11 +- .../AllowedConnectionsList.Serialization.cs | 11 +- .../AllowlistCustomAlertRule.Serialization.cs | 46 +-- ...MessagesNotInAllowedRange.Serialization.cs | 47 +-- ...MessagesNotInAllowedRange.Serialization.cs | 47 +-- ...MessagesNotInAllowedRange.Serialization.cs | 47 +-- .../Models/ApiCollectionList.Serialization.cs | 11 +- .../Models/ApplicationsList.Serialization.cs | 11 +- .../Models/AscLocationList.Serialization.cs | 11 +- .../Models/AssessmentLinks.Serialization.cs | 11 +- ...aExternalSecuritySolution.Serialization.cs | 61 +--- .../AtaSolutionProperties.Serialization.cs | 27 +- ...ticationDetailsProperties.Serialization.cs | 11 +- ...toProvisioningSettingList.Serialization.cs | 11 +- .../Models/AutomationList.Serialization.cs | 11 +- ...ticationDetailsProperties.Serialization.cs | 44 +-- ...ticationDetailsProperties.Serialization.cs | 44 +-- ...AwsDefenderForServersInfo.Serialization.cs | 11 +- .../Models/AwsEnvironment.Serialization.cs | 29 +- .../AwsInformationProtection.Serialization.cs | 11 +- ...sOrganizationalDataMaster.Serialization.cs | 29 +- ...sOrganizationalDataMember.Serialization.cs | 29 +- .../AwsOrganizationalInfo.Serialization.cs | 11 +- ...zureDevOpsOrgListResponse.Serialization.cs | 11 +- ...DevOpsProjectListResponse.Serialization.cs | 11 +- ...OpsRepositoryListResponse.Serialization.cs | 11 +- ...ureDevOpsScopeEnvironment.Serialization.cs | 29 +- .../AzureResourceDetails.Serialization.cs | 29 +- .../AzureResourceIdentifier.Serialization.cs | 29 +- .../AzureServersSetting.Serialization.cs | 49 +-- .../BaselineAdjustedResult.Serialization.cs | 11 +- .../BenchmarkReference.Serialization.cs | 11 +- .../Models/BuiltInInfoType.Serialization.cs | 11 +- .../CategoryConfiguration.Serialization.cs | 11 +- ...fExternalSecuritySolution.Serialization.cs | 61 +--- .../CefSolutionProperties.Serialization.cs | 27 +- .../Models/ComplianceList.Serialization.cs | 11 +- .../ComplianceResultList.Serialization.cs | 11 +- .../Models/ComplianceSegment.Serialization.cs | 11 +- .../ConnectableResourceInfo.Serialization.cs | 11 +- .../ConnectedResourceInfo.Serialization.cs | 11 +- ...onnectionFromIPNotAllowed.Serialization.cs | 53 +--- .../ConnectionToIPNotAllowed.Serialization.cs | 53 +--- .../ConnectorSettingList.Serialization.cs | 11 +- ...ryVulnerabilityProperties.Serialization.cs | 29 +- .../CspmMonitorAwsOffering.Serialization.cs | 34 +- ...ringNativeCloudConnection.Serialization.cs | 11 +- ...onitorAzureDevOpsOffering.Serialization.cs | 34 +- .../CspmMonitorGcpOffering.Serialization.cs | 34 +- ...ringNativeCloudConnection.Serialization.cs | 11 +- ...CspmMonitorGitLabOffering.Serialization.cs | 34 +- ...CspmMonitorGithubOffering.Serialization.cs | 34 +- .../Models/CustomAlertRule.Serialization.cs | 11 +- ...tionCreateOrUpdateContent.Serialization.cs | 47 +-- ...mentAutomationsListResult.Serialization.cs | 11 +- ...mentCreateOrUpdateContent.Serialization.cs | 11 +- ...toreAssignmentsListResult.Serialization.cs | 11 +- .../DataExportSettings.Serialization.cs | 49 +-- .../DefenderCspmAwsOffering.Serialization.cs | 34 +- ...fenderCspmAwsOfferingCiem.Serialization.cs | 11 +- ...mAwsOfferingCiemDiscovery.Serialization.cs | 11 +- ...erCspmAwsOfferingCiemOidc.Serialization.cs | 11 +- ...gDataSensitivityDiscovery.Serialization.cs | 11 +- ...mAwsOfferingDatabasesDspm.Serialization.cs | 11 +- ...nersAgentlessDiscoveryK8S.Serialization.cs | 11 +- ...ContainersImageAssessment.Serialization.cs | 11 +- ...CspmAwsOfferingVmScanners.Serialization.cs | 11 +- ...ngVmScannersConfiguration.Serialization.cs | 11 +- .../DefenderCspmGcpOffering.Serialization.cs | 34 +- ...mGcpOfferingCiemDiscovery.Serialization.cs | 11 +- ...gDataSensitivityDiscovery.Serialization.cs | 11 +- ...nersAgentlessDiscoveryK8S.Serialization.cs | 11 +- ...ContainersImageAssessment.Serialization.cs | 11 +- ...CspmGcpOfferingVmScanners.Serialization.cs | 11 +- ...ngVmScannersConfiguration.Serialization.cs | 11 +- ...ProvisioningConfiguration.Serialization.cs | 11 +- ...sAwsOfferingDatabasesDspm.Serialization.cs | 11 +- ...rForContainersAwsOffering.Serialization.cs | 34 +- ...feringCloudWatchToKinesis.Serialization.cs | 11 +- ...erVulnerabilityAssessment.Serialization.cs | 11 +- ...lnerabilityAssessmentTask.Serialization.cs | 11 +- ...ersAwsOfferingKinesisToS3.Serialization.cs | 11 +- ...ringKubernetesScubaReader.Serialization.cs | 11 +- ...OfferingKubernetesService.Serialization.cs | 11 +- ...nersAgentlessDiscoveryK8S.Serialization.cs | 11 +- ...ContainersImageAssessment.Serialization.cs | 11 +- ...rForContainersGcpOffering.Serialization.cs | 34 +- ...lineNativeCloudConnection.Serialization.cs | 11 +- ...nersAgentlessDiscoveryK8S.Serialization.cs | 11 +- ...ContainersImageAssessment.Serialization.cs | 11 +- ...ringNativeCloudConnection.Serialization.cs | 11 +- ...erForDatabasesAwsOffering.Serialization.cs | 34 +- ...feringArcAutoProvisioning.Serialization.cs | 11 +- ...orDatabasesAwsOfferingRds.Serialization.cs | 11 +- ...erForDatabasesGcpOffering.Serialization.cs | 34 +- ...feringArcAutoProvisioning.Serialization.cs | 11 +- ...ProvisioningConfiguration.Serialization.cs | 11 +- ...DevOpsAzureDevOpsOffering.Serialization.cs | 34 +- ...erForDevOpsGitLabOffering.Serialization.cs | 34 +- ...erForDevOpsGithubOffering.Serialization.cs | 34 +- ...nderForServersAwsOffering.Serialization.cs | 34 +- ...feringArcAutoProvisioning.Serialization.cs | 11 +- ...ProvisioningConfiguration.Serialization.cs | 11 +- ...feringMdeAutoProvisioning.Serialization.cs | 11 +- ...ServersAwsOfferingSubPlan.Serialization.cs | 11 +- ...versAwsOfferingVmScanners.Serialization.cs | 11 +- ...ngVmScannersConfiguration.Serialization.cs | 11 +- ...ssessmentAutoProvisioning.Serialization.cs | 11 +- ...ProvisioningConfiguration.Serialization.cs | 11 +- ...nderForServersGcpOffering.Serialization.cs | 34 +- ...feringArcAutoProvisioning.Serialization.cs | 11 +- ...ProvisioningConfiguration.Serialization.cs | 11 +- ...feringMdeAutoProvisioning.Serialization.cs | 11 +- ...ServersGcpOfferingSubPlan.Serialization.cs | 11 +- ...versGcpOfferingVmScanners.Serialization.cs | 11 +- ...ngVmScannersConfiguration.Serialization.cs | 11 +- ...ssessmentAutoProvisioning.Serialization.cs | 11 +- ...ProvisioningConfiguration.Serialization.cs | 11 +- .../DenylistCustomAlertRule.Serialization.cs | 46 +-- .../DevOpsAuthorization.Serialization.cs | 11 +- ...ConfigurationListResponse.Serialization.cs | 11 +- ...psConfigurationProperties.Serialization.cs | 11 +- .../DevOpsOrgProperties.Serialization.cs | 11 +- .../DevOpsProjectProperties.Serialization.cs | 11 +- ...evOpsRepositoryProperties.Serialization.cs | 11 +- .../DeviceSecurityGroupList.Serialization.cs | 11 +- ...dInvokesNotInAllowedRange.Serialization.cs | 47 +-- ...iscoveredSecuritySolution.Serialization.cs | 47 +-- ...veredSecuritySolutionList.Serialization.cs | 11 +- ...tiveNetworkSecurityGroups.Serialization.cs | 11 +- .../EnvironmentDetails.Serialization.cs | 11 +- ...ecuteGovernanceRuleParams.Serialization.cs | 11 +- .../ExtensionOperationStatus.Serialization.cs | 11 +- .../ExternalSecuritySolution.Serialization.cs | 47 +-- ...ernalSecuritySolutionList.Serialization.cs | 11 +- ...ecuritySolutionProperties.Serialization.cs | 11 +- ...alLoginsNotInAllowedRange.Serialization.cs | 47 +-- ...eUploadsNotInAllowedRange.Serialization.cs | 47 +-- ...dentialsDetailsProperties.Serialization.cs | 44 +-- ...abasesArcAutoProvisioning.Serialization.cs | 11 +- ...GcpDefenderForServersInfo.Serialization.cs | 11 +- ...pMemberOrganizationalInfo.Serialization.cs | 29 +- .../GcpOrganizationalInfo.Serialization.cs | 11 +- ...pParentOrganizationalInfo.Serialization.cs | 29 +- .../Models/GcpProjectDetails.Serialization.cs | 11 +- .../GcpProjectEnvironment.Serialization.cs | 29 +- ...ePropertiesMipInformation.Serialization.cs | 11 +- .../GitHubOwnerListResponse.Serialization.cs | 11 +- ...HubRepositoryListResponse.Serialization.cs | 11 +- .../GitLabGroupListResponse.Serialization.cs | 11 +- ...GitLabProjectListResponse.Serialization.cs | 11 +- .../GithubScopeEnvironment.Serialization.cs | 29 +- .../GitlabScopeEnvironment.Serialization.cs | 29 +- ...eAssignmentAdditionalInfo.Serialization.cs | 11 +- ...GovernanceAssignmentsList.Serialization.cs | 11 +- ...vernanceEmailNotification.Serialization.cs | 11 +- ...anceRuleEmailNotification.Serialization.cs | 11 +- .../GovernanceRuleList.Serialization.cs | 11 +- .../GovernanceRuleMetadata.Serialization.cs | 11 +- ...GovernanceRuleOwnerSource.Serialization.cs | 11 +- .../HealthDataClassification.Serialization.cs | 11 +- ...althReportResourceDetails.Serialization.cs | 11 +- .../HealthReportStatus.Serialization.cs | 11 +- .../Models/HealthReportsList.Serialization.cs | 11 +- ...MessagesNotInAllowedRange.Serialization.cs | 47 +-- ...MessagesNotInAllowedRange.Serialization.cs | 47 +-- ...MessagesNotInAllowedRange.Serialization.cs | 47 +-- ...ComputeSettingsProperties.Serialization.cs | 11 +- ...tionProtectionAwsOffering.Serialization.cs | 34 +- ...ormationProtectionKeyword.Serialization.cs | 11 +- ...formationProtectionPolicy.Serialization.cs | 47 +-- ...ationProtectionPolicyList.Serialization.cs | 11 +- ...curityAggregatedAlertList.Serialization.cs | 11 +- ...yAggregatedAlertTopDevice.Serialization.cs | 11 +- ...regatedRecommendationList.Serialization.cs | 11 +- .../IotSecurityAlertedDevice.Serialization.cs | 11 +- .../IotSecurityDeviceAlert.Serialization.cs | 11 +- ...urityDeviceRecommendation.Serialization.cs | 11 +- ...lyticsModelDevicesMetrics.Serialization.cs | 11 +- ...olutionAnalyticsModelList.Serialization.cs | 11 +- .../IotSecuritySolutionPatch.Serialization.cs | 38 +-- .../IotSecuritySolutionsList.Serialization.cs | 11 +- .../IotSeverityMetrics.Serialization.cs | 11 +- ...NetworkAccessPoliciesList.Serialization.cs | 11 +- ...cessPolicyInitiateContent.Serialization.cs | 11 +- ...kAccessPolicyInitiatePort.Serialization.cs | 11 +- ...icyInitiateVirtualMachine.Serialization.cs | 11 +- ...ccessPolicyVirtualMachine.Serialization.cs | 11 +- .../JitNetworkAccessPortRule.Serialization.cs | 11 +- ...tNetworkAccessRequestInfo.Serialization.cs | 11 +- ...tNetworkAccessRequestPort.Serialization.cs | 11 +- ...cessRequestVirtualMachine.Serialization.cs | 11 +- .../ListCustomAlertRule.Serialization.cs | 41 +-- .../LocalUserNotAllowed.Serialization.cs | 53 +--- .../LogAnalyticsIdentifier.Serialization.cs | 29 +- .../Models/MdeOnboarding.Serialization.cs | 47 +-- .../MdeOnboardingDataList.Serialization.cs | 11 +- .../MipSensitivityLabel.Serialization.cs | 11 +- ...MessagesNotInAllowedRange.Serialization.cs | 47 +-- ...MessagesNotInAllowedRange.Serialization.cs | 47 +-- ...MessagesNotInAllowedRange.Serialization.cs | 47 +-- .../OnPremiseResourceDetails.Serialization.cs | 29 +- ...PremiseSqlResourceDetails.Serialization.cs | 37 +-- ...rationStatusAutoGenerated.Serialization.cs | 11 +- .../PathRecommendation.Serialization.cs | 11 +- .../Models/PlanExtension.Serialization.cs | 11 +- .../Models/PricingList.Serialization.cs | 11 +- .../Models/ProcessNotAllowed.Serialization.cs | 53 +--- .../ProxyServerProperties.Serialization.cs | 11 +- ...uePurgesNotInAllowedRange.Serialization.cs | 47 +-- ...onConfigurationProperties.Serialization.cs | 11 +- .../RecommendedSecurityRule.Serialization.cs | 11 +- ...yComplianceAssessmentList.Serialization.cs | 11 +- ...toryComplianceControlList.Serialization.cs | 11 +- ...oryComplianceStandardList.Serialization.cs | 11 +- .../Models/RemediationEta.Serialization.cs | 11 +- .../RuleResultsProperties.Serialization.cs | 11 +- .../Models/RulesResults.Serialization.cs | 11 +- .../RulesResultsContent.Serialization.cs | 11 +- .../Models/ScanResults.Serialization.cs | 11 +- .../Generated/Models/Scans.Serialization.cs | 11 +- ...coreControlDefinitionItem.Serialization.cs | 47 +-- ...coreControlDefinitionList.Serialization.cs | 11 +- ...reControlDefinitionSource.Serialization.cs | 11 +- ...SecureScoreControlDetails.Serialization.cs | 47 +-- .../SecureScoreControlList.Serialization.cs | 11 +- .../Models/SecureScoresList.Serialization.cs | 11 +- .../SecurityAlertEntity.Serialization.cs | 11 +- ...tyAlertResourceIdentifier.Serialization.cs | 11 +- ...rBundlesRequestProperties.Serialization.cs | 14 +- ...rityAlertSimulatorContent.Serialization.cs | 11 +- ...imulatorRequestProperties.Serialization.cs | 11 +- ...tyAlertSupportingEvidence.Serialization.cs | 11 +- ...SecurityAlertSyncSettings.Serialization.cs | 49 +-- ...mentCreateOrUpdateContent.Serialization.cs | 47 +-- .../SecurityAssessmentList.Serialization.cs | 11 +- ...AssessmentMetadataPartner.Serialization.cs | 11 +- ...essmentMetadataProperties.Serialization.cs | 11 +- ...smentMetadataResponseList.Serialization.cs | 11 +- ...SecurityAssessmentPartner.Serialization.cs | 11 +- ...ityAssessmentPublishDates.Serialization.cs | 11 +- .../SecurityAssessmentStatus.Serialization.cs | 11 +- ...ityAssessmentStatusResult.Serialization.cs | 39 +-- .../SecurityAutomationAction.Serialization.cs | 11 +- ...yAutomationActionEventHub.Serialization.cs | 29 +- ...yAutomationActionLogicApp.Serialization.cs | 29 +- ...AutomationActionWorkspace.Serialization.cs | 29 +- ...SecurityAutomationRuleSet.Serialization.cs | 11 +- .../SecurityAutomationScope.Serialization.cs | 11 +- .../SecurityAutomationSource.Serialization.cs | 11 +- ...yAutomationTriggeringRule.Serialization.cs | 11 +- ...utomationValidationStatus.Serialization.cs | 11 +- ...tyCenterAllowedConnection.Serialization.cs | 47 +-- ...curityCenterCloudOffering.Serialization.cs | 11 +- ...yCenterFileProtectionMode.Serialization.cs | 11 +- ...curityCenterPublisherInfo.Serialization.cs | 11 +- ...rityCenterResourceDetails.Serialization.cs | 11 +- ...ityCenterTagsResourceInfo.Serialization.cs | 11 +- ...urityConnectorEnvironment.Serialization.cs | 11 +- ...ctorGitHubOwnerProperties.Serialization.cs | 11 +- ...itHubRepositoryProperties.Serialization.cs | 11 +- ...ctorGitLabGroupProperties.Serialization.cs | 11 +- ...orGitLabProjectProperties.Serialization.cs | 11 +- .../SecurityConnectorsList.Serialization.cs | 11 +- .../SecurityContactList.Serialization.cs | 11 +- ...pertiesAlertNotifications.Serialization.cs | 11 +- ...ertiesNotificationsByRole.Serialization.cs | 11 +- .../Models/SecurityCve.Serialization.cs | 11 +- .../Models/SecurityCvss.Serialization.cs | 11 +- ...SecurityHealthReportIssue.Serialization.cs | 11 +- ...curityInformationTypeInfo.Serialization.cs | 11 +- .../SecurityOperatorList.Serialization.cs | 11 +- .../Models/SecuritySolution.Serialization.cs | 47 +-- .../SecuritySolutionList.Serialization.cs | 11 +- ...itySolutionsReferenceData.Serialization.cs | 47 +-- ...olutionsReferenceDataList.Serialization.cs | 11 +- ...bAssessmentAdditionalInfo.Serialization.cs | 11 +- ...SecuritySubAssessmentList.Serialization.cs | 11 +- .../Models/SecurityTaskList.Serialization.cs | 11 +- .../SecurityTaskProperties.Serialization.cs | 11 +- .../SecurityTopologyResource.Serialization.cs | 47 +-- .../Models/SensitivityLabel.Serialization.cs | 11 +- ...tingCreateOrUpdateContent.Serialization.cs | 11 +- ...itivitySettingsProperties.Serialization.cs | 11 +- ...nerabilityAssessmentsList.Serialization.cs | 11 +- ...tyAssessmentsSettingsList.Serialization.cs | 11 +- ...erVulnerabilityProperties.Serialization.cs | 29 +- ...ervicePrincipalProperties.Serialization.cs | 11 +- .../Models/SettingsList.Serialization.cs | 11 +- .../Models/SoftwaresList.Serialization.cs | 11 +- ...erVulnerabilityProperties.Serialization.cs | 29 +- ...abilityAssessmentBaseline.Serialization.cs | 11 +- ...RuleCreateOrUpdateContent.Serialization.cs | 11 +- ...lityAssessmentRemediation.Serialization.cs | 11 +- ...yAssessmentScanProperties.Serialization.cs | 11 +- ...ilityAssessmentScanResult.Serialization.cs | 47 +-- ...smentScanResultProperties.Serialization.cs | 11 +- .../SubAssessmentStatus.Serialization.cs | 11 +- .../SuppressionAlertsScope.Serialization.cs | 11 +- ...ressionAlertsScopeElement.Serialization.cs | 11 +- ...TargetBranchConfiguration.Serialization.cs | 11 +- .../ThresholdCustomAlertRule.Serialization.cs | 41 +-- ...TimeWindowCustomAlertRule.Serialization.cs | 45 +-- .../Models/TopologyList.Serialization.cs | 11 +- .../TopologySingleResource.Serialization.cs | 11 +- ...pologySingleResourceChild.Serialization.cs | 11 +- ...ologySingleResourceParent.Serialization.cs | 11 +- ...nUpdatesNotInAllowedRange.Serialization.cs | 47 +-- ...erationsNotInAllowedRange.Serialization.cs | 47 +-- .../UnknownAdditionalData.Serialization.cs | 29 +- ...wnAlertResourceIdentifier.Serialization.cs | 29 +- ...imulatorRequestProperties.Serialization.cs | 14 +- ...ticationDetailsProperties.Serialization.cs | 44 +-- .../UnknownAutomationAction.Serialization.cs | 29 +- ...nownAwsOrganizationalData.Serialization.cs | 29 +- .../UnknownCloudOffering.Serialization.cs | 34 +- .../UnknownCustomAlertRule.Serialization.cs | 41 +-- .../UnknownEnvironmentData.Serialization.cs | 29 +- ...nExternalSecuritySolution.Serialization.cs | 61 +--- ...nownGcpOrganizationalData.Serialization.cs | 29 +- .../UnknownResourceDetails.Serialization.cs | 29 +- ...abilityAssessmentsSetting.Serialization.cs | 49 +-- .../Models/UnknownSetting.Serialization.cs | 49 +-- ...serDefinedInformationType.Serialization.cs | 11 +- ...efinedResourcesProperties.Serialization.cs | 11 +- .../UserRecommendation.Serialization.cs | 11 +- .../Models/VendorReference.Serialization.cs | 11 +- .../Models/VmRecommendation.Serialization.cs | 11 +- ...lnerabilityAssessmentRule.Serialization.cs | 11 +- ...yAssessmentRuleQueryCheck.Serialization.cs | 11 +- .../WorkspaceSettingList.Serialization.cs | 11 +- ...yComplianceAssessmentData.Serialization.cs | 47 +-- ...toryComplianceControlData.Serialization.cs | 47 +-- ...oryComplianceStandardData.Serialization.cs | 47 +-- .../SecureScoreData.Serialization.cs | 47 +-- .../SecurityAlertData.Serialization.cs | 47 +-- ...AlertsSuppressionRuleData.Serialization.cs | 47 +-- .../SecurityApplicationData.Serialization.cs | 47 +-- .../SecurityAssessmentData.Serialization.cs | 47 +-- ...ityAssessmentMetadataData.Serialization.cs | 47 +-- .../SecurityAutomationData.Serialization.cs | 60 +--- ...tyCenterApiCollectionData.Serialization.cs | 47 +-- ...ecurityCenterLocationData.Serialization.cs | 47 +-- ...SecurityCenterPricingData.Serialization.cs | 47 +-- ...ecurityCloudConnectorData.Serialization.cs | 47 +-- .../SecurityComplianceData.Serialization.cs | 47 +-- .../SecurityConnectorData.Serialization.cs | 60 +--- ...yConnectorGitHubOwnerData.Serialization.cs | 47 +-- ...ectorGitHubRepositoryData.Serialization.cs | 47 +-- ...yConnectorGitLabGroupData.Serialization.cs | 47 +-- ...onnectorGitLabProjectData.Serialization.cs | 47 +-- .../SecurityContactData.Serialization.cs | 47 +-- .../SecurityHealthReportData.Serialization.cs | 47 +-- .../SecurityOperatorData.Serialization.cs | 47 +-- .../SecuritySettingData.Serialization.cs | 47 +-- ...SecuritySubAssessmentData.Serialization.cs | 47 +-- .../SecurityTaskData.Serialization.cs | 47 +-- ...urityWorkspaceSettingData.Serialization.cs | 47 +-- .../SensitivitySettingData.Serialization.cs | 47 +-- ...lnerabilityAssessmentData.Serialization.cs | 47 +-- ...ityAssessmentsSettingData.Serialization.cs | 47 +-- .../SoftwareInventoryData.Serialization.cs | 47 +-- ...ssessmentBaselineRuleData.Serialization.cs | 47 +-- ...abilityAssessmentScanData.Serialization.cs | 47 +-- .../src/autorest.md | 1 + 398 files changed, 4007 insertions(+), 5524 deletions(-) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/CHANGELOG.md b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/CHANGELOG.md index bb4a10e2fdf2b..b5d03ee2a0e07 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/CHANGELOG.md +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/api/Azure.ResourceManager.SecurityCenter.netstandard2.0.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/api/Azure.ResourceManager.SecurityCenter.netstandard2.0.cs index b5868ccf91424..7a6280bd854c3 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/api/Azure.ResourceManager.SecurityCenter.netstandard2.0.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/api/Azure.ResourceManager.SecurityCenter.netstandard2.0.cs @@ -24,6 +24,7 @@ public AdaptiveApplicationControlGroupData() { } public Azure.ResourceManager.SecurityCenter.Models.RecommendationStatus? RecommendationStatus { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlGroupSourceSystem? SourceSystem { get { throw null; } } public System.Collections.Generic.IList VmRecommendations { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.AdaptiveApplicationControlGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.AdaptiveApplicationControlGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -70,6 +71,7 @@ public AdaptiveNetworkHardeningData() { } public System.Collections.Generic.IList EffectiveNetworkSecurityGroups { get { throw null; } } public System.Collections.Generic.IList Rules { get { throw null; } } public System.DateTimeOffset? RulesCalculatedOn { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.AdaptiveNetworkHardeningData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.AdaptiveNetworkHardeningData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -97,6 +99,7 @@ public partial class AdvancedThreatProtectionSettingData : Azure.ResourceManager { public AdvancedThreatProtectionSettingData() { } public bool? IsEnabled { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.AdvancedThreatProtectionSettingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.AdvancedThreatProtectionSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -141,6 +144,7 @@ public partial class AutoProvisioningSettingData : Azure.ResourceManager.Models. { public AutoProvisioningSettingData() { } public Azure.ResourceManager.SecurityCenter.Models.AutoProvisionState? AutoProvision { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.AutoProvisioningSettingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.AutoProvisioningSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -183,6 +187,7 @@ public partial class ComplianceResultData : Azure.ResourceManager.Models.Resourc { public ComplianceResultData() { } public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentResourceStatus? ResourceStatus { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.ComplianceResultData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.ComplianceResultData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -231,6 +236,7 @@ public CustomAssessmentAutomationData() { } public string RemediationDescription { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentSeverity? Severity { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationSupportedCloud? SupportedCloud { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.CustomAssessmentAutomationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.CustomAssessmentAutomationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -278,6 +284,7 @@ public partial class CustomEntityStoreAssignmentData : Azure.ResourceManager.Mod public CustomEntityStoreAssignmentData() { } public string EntityStoreDatabaseLink { get { throw null; } set { } } public string Principal { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.CustomEntityStoreAssignmentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.CustomEntityStoreAssignmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -326,6 +333,7 @@ public DefenderForStorageSettingData() { } public Azure.ResourceManager.SecurityCenter.Models.ExtensionOperationStatus MalwareScanningOperationStatus { get { throw null; } } public Azure.Core.ResourceIdentifier ScanResultsEventGridTopicResourceId { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.ExtensionOperationStatus SensitiveDataDiscoveryOperationStatus { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.DefenderForStorageSettingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.DefenderForStorageSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -373,6 +381,7 @@ public DeviceSecurityGroupData() { } public System.Collections.Generic.IList DenylistRules { get { throw null; } } public System.Collections.Generic.IList ThresholdRules { get { throw null; } } public System.Collections.Generic.IList TimeWindowRules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.DeviceSecurityGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.DeviceSecurityGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -402,6 +411,7 @@ public partial class DevOpsConfigurationData : Azure.ResourceManager.Models.Reso { public DevOpsConfigurationData() { } public Azure.ResourceManager.SecurityCenter.Models.DevOpsConfigurationProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.DevOpsConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.DevOpsConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -467,6 +477,7 @@ public partial class DevOpsOrgData : Azure.ResourceManager.Models.ResourceData, { public DevOpsOrgData() { } public Azure.ResourceManager.SecurityCenter.Models.DevOpsOrgProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.DevOpsOrgData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.DevOpsOrgData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -514,6 +525,7 @@ public partial class DevOpsProjectData : Azure.ResourceManager.Models.ResourceDa { public DevOpsProjectData() { } public Azure.ResourceManager.SecurityCenter.Models.DevOpsProjectProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.DevOpsProjectData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.DevOpsProjectData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -561,6 +573,7 @@ public partial class DevOpsRepositoryData : Azure.ResourceManager.Models.Resourc { public DevOpsRepositoryData() { } public Azure.ResourceManager.SecurityCenter.Models.DevOpsRepositoryProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.DevOpsRepositoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.DevOpsRepositoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -610,6 +623,7 @@ public GovernanceAssignmentData() { } public string Owner { get { throw null; } set { } } public System.DateTimeOffset? RemediationDueOn { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.RemediationEta RemediationEta { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.GovernanceAssignmentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.GovernanceAssignmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -670,6 +684,7 @@ public GovernanceRuleData() { } public Azure.ResourceManager.SecurityCenter.Models.GovernanceRuleType? RuleType { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.GovernanceRuleSourceResourceType? SourceResourceType { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.GovernanceRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.GovernanceRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -729,6 +744,7 @@ public IotSecurityAggregatedAlertData() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public System.Collections.Generic.IReadOnlyList TopDevicesList { get { throw null; } } public string VendorName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.IotSecurityAggregatedAlertData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.IotSecurityAggregatedAlertData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -781,6 +797,7 @@ public IotSecurityAggregatedRecommendationData() { } public Azure.ResourceManager.SecurityCenter.Models.ReportedSeverity? ReportedSeverity { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public long? UnhealthyDeviceCount { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.IotSecurityAggregatedRecommendationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.IotSecurityAggregatedRecommendationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -811,6 +828,7 @@ public IotSecuritySolutionAnalyticsModelData() { } public System.Collections.Generic.IList MostPrevalentDeviceRecommendations { get { throw null; } } public System.Collections.Generic.IList TopAlertedDevices { get { throw null; } } public long? UnhealthyDeviceCount { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.IotSecuritySolutionAnalyticsModelData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.IotSecuritySolutionAnalyticsModelData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -869,6 +887,7 @@ public IotSecuritySolutionData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.SecurityCenter.Models.UnmaskedIPLoggingStatus? UnmaskedIPLoggingStatus { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.UserDefinedResourcesProperties UserDefinedResources { get { throw null; } set { } } public string Workspace { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.IotSecuritySolutionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.IotSecuritySolutionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -926,6 +945,7 @@ public JitNetworkAccessPolicyData(System.Collections.Generic.IEnumerable Requests { get { throw null; } } public System.Collections.Generic.IList VirtualMachines { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.JitNetworkAccessPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.JitNetworkAccessPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -979,6 +999,7 @@ public RegulatoryComplianceAssessmentData() { } public int? SkippedResources { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.RegulatoryComplianceState? State { get { throw null; } set { } } public int? UnsupportedResources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.RegulatoryComplianceAssessmentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.RegulatoryComplianceAssessmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1023,6 +1044,7 @@ public RegulatoryComplianceControlData() { } public int? PassedAssessments { get { throw null; } } public int? SkippedAssessments { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.RegulatoryComplianceState? State { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.RegulatoryComplianceControlData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.RegulatoryComplianceControlData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1070,6 +1092,7 @@ public RegulatoryComplianceStandardData() { } public int? SkippedControls { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.RegulatoryComplianceState? State { get { throw null; } set { } } public int? UnsupportedControls { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.RegulatoryComplianceStandardData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.RegulatoryComplianceStandardData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1185,6 +1208,7 @@ public SecureScoreData() { } public int? Max { get { throw null; } } public double? Percentage { get { throw null; } } public long? Weight { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecureScoreData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecureScoreData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1238,6 +1262,7 @@ public SecurityAlertData() { } public System.Collections.Generic.IReadOnlyList Techniques { get { throw null; } } public string VendorName { get { throw null; } } public string Version { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityAlertData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityAlertData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1271,6 +1296,7 @@ public SecurityAlertsSuppressionRuleData() { } public string Reason { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.SecurityAlertsSuppressionRuleState? State { get { throw null; } set { } } public System.Collections.Generic.IList SuppressionAlertsScopeAllOf { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityAlertsSuppressionRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityAlertsSuppressionRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1303,6 +1329,7 @@ public SecurityApplicationData() { } public string Description { get { throw null; } set { } } public string DisplayName { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.ApplicationSourceResourceType? SourceResourceType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityApplicationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityApplicationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1331,6 +1358,7 @@ public SecurityAssessmentData() { } public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentPartner PartnersData { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterResourceDetails ResourceDetails { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatusResult Status { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityAssessmentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityAssessmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1356,6 +1384,7 @@ public SecurityAssessmentMetadataData() { } public System.Collections.Generic.IList Techniques { get { throw null; } } public System.Collections.Generic.IList Threats { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentUserImpact? UserImpact { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityAssessmentMetadataData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityAssessmentMetadataData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1414,6 +1443,7 @@ public SecurityAutomationData(Azure.Core.AzureLocation location) { } public string Kind { get { throw null; } set { } } public System.Collections.Generic.IList Scopes { get { throw null; } } public System.Collections.Generic.IList Sources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityAutomationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityAutomationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1477,6 +1507,7 @@ public SecurityCenterApiCollectionData() { } public long? NumberOfUnauthenticatedApiEndpoints { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.SecurityFamilyProvisioningState? ProvisioningState { get { throw null; } } public string SensitivityLabel { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityCenterApiCollectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityCenterApiCollectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1771,6 +1802,7 @@ public partial class SecurityCenterLocationData : Azure.ResourceManager.Models.R { public SecurityCenterLocationData() { } public System.BinaryData Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityCenterLocationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityCenterLocationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1840,6 +1872,7 @@ public SecurityCenterPricingData() { } public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterPricingTier? PricingTier { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList ReplacedBy { get { throw null; } } public string SubPlan { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityCenterPricingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityCenterPricingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1888,6 +1921,7 @@ public partial class SecurityCloudConnectorData : Azure.ResourceManager.Models.R public SecurityCloudConnectorData() { } public Azure.ResourceManager.SecurityCenter.Models.AuthenticationDetailsProperties AuthenticationDetails { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.HybridComputeSettingsProperties HybridComputeSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityCloudConnectorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityCloudConnectorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1934,6 +1968,7 @@ public SecurityComplianceData() { } public System.DateTimeOffset? AssessedOn { get { throw null; } } public System.Collections.Generic.IReadOnlyList AssessmentResult { get { throw null; } } public int? ResourceCount { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityComplianceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityComplianceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2018,6 +2053,7 @@ public SecurityConnectorData(Azure.Core.AzureLocation location) { } public System.DateTimeOffset? HierarchyIdentifierTrialEndOn { get { throw null; } } public string Kind { get { throw null; } set { } } public System.Collections.Generic.IList Offerings { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityConnectorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityConnectorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2043,6 +2079,7 @@ public partial class SecurityConnectorGitHubOwnerData : Azure.ResourceManager.Mo { public SecurityConnectorGitHubOwnerData() { } public Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitHubOwnerProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityConnectorGitHubOwnerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityConnectorGitHubOwnerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2086,6 +2123,7 @@ public partial class SecurityConnectorGitHubRepositoryData : Azure.ResourceManag { public SecurityConnectorGitHubRepositoryData() { } public Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitHubRepositoryProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityConnectorGitHubRepositoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityConnectorGitHubRepositoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2128,6 +2166,7 @@ public partial class SecurityConnectorGitLabGroupData : Azure.ResourceManager.Mo { public SecurityConnectorGitLabGroupData() { } public Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitLabGroupProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityConnectorGitLabGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityConnectorGitLabGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2171,6 +2210,7 @@ public partial class SecurityConnectorGitLabProjectData : Azure.ResourceManager. { public SecurityConnectorGitLabProjectData() { } public Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitLabProjectProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityConnectorGitLabProjectData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityConnectorGitLabProjectData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2291,6 +2331,7 @@ public SecurityContactData() { } public string Emails { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.SecurityContactPropertiesNotificationsByRole NotificationsByRole { get { throw null; } set { } } public string Phone { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityContactData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityContactData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2342,6 +2383,7 @@ public SecurityHealthReportData() { } public System.Collections.Generic.IReadOnlyDictionary ReportAdditionalData { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.HealthReportResourceDetails ResourceDetails { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.HealthReportStatus Status { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityHealthReportData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityHealthReportData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2384,6 +2426,7 @@ public partial class SecurityOperatorData : Azure.ResourceManager.Models.Resourc { public SecurityOperatorData() { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityOperatorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityOperatorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2429,6 +2472,7 @@ protected SecuritySettingCollection() { } public partial class SecuritySettingData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SecuritySettingData() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecuritySettingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecuritySettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2480,6 +2524,7 @@ public SecuritySubAssessmentData() { } public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterResourceDetails ResourceDetails { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.SubAssessmentStatus Status { get { throw null; } set { } } public string VulnerabilityId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecuritySubAssessmentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecuritySubAssessmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2509,6 +2554,7 @@ public SecurityTaskData() { } public Azure.ResourceManager.SecurityCenter.Models.SecurityTaskProperties SecurityTaskParameters { get { throw null; } set { } } public string State { get { throw null; } } public string SubState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityTaskData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityTaskData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2537,6 +2583,7 @@ public partial class SecurityWorkspaceSettingData : Azure.ResourceManager.Models public SecurityWorkspaceSettingData() { } public string Scope { get { throw null; } set { } } public Azure.Core.ResourceIdentifier WorkspaceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityWorkspaceSettingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SecurityWorkspaceSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2566,6 +2613,7 @@ public partial class SensitivitySettingData : Azure.ResourceManager.Models.Resou { internal SensitivitySettingData() { } public Azure.ResourceManager.SecurityCenter.Models.SensitivitySettingsProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SensitivitySettingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SensitivitySettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2610,6 +2658,7 @@ public partial class ServerVulnerabilityAssessmentData : Azure.ResourceManager.M { public ServerVulnerabilityAssessmentData() { } public Azure.ResourceManager.SecurityCenter.Models.ServerVulnerabilityAssessmentPropertiesProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.ServerVulnerabilityAssessmentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.ServerVulnerabilityAssessmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2655,6 +2704,7 @@ protected ServerVulnerabilityAssessmentsSettingCollection() { } public abstract partial class ServerVulnerabilityAssessmentsSettingData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected ServerVulnerabilityAssessmentsSettingData() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.ServerVulnerabilityAssessmentsSettingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.ServerVulnerabilityAssessmentsSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2707,6 +2757,7 @@ public SoftwareInventoryData() { } public string SoftwareName { get { throw null; } set { } } public string Vendor { get { throw null; } set { } } public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SoftwareInventoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SoftwareInventoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2754,6 +2805,7 @@ public partial class SqlVulnerabilityAssessmentBaselineRuleData : Azure.Resource { public SqlVulnerabilityAssessmentBaselineRuleData() { } public System.Collections.Generic.IList> RuleResults { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SqlVulnerabilityAssessmentBaselineRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SqlVulnerabilityAssessmentBaselineRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2795,6 +2847,7 @@ public partial class SqlVulnerabilityAssessmentScanData : Azure.ResourceManager. { public SqlVulnerabilityAssessmentScanData() { } public Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SqlVulnerabilityAssessmentScanData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.SqlVulnerabilityAssessmentScanData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3321,6 +3374,7 @@ public partial class AadExternalSecuritySolution : Azure.ResourceManager.Securit { public AadExternalSecuritySolution() { } public Azure.ResourceManager.SecurityCenter.Models.AadSolutionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AadExternalSecuritySolution System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AadExternalSecuritySolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3331,6 +3385,7 @@ public partial class AadSolutionProperties : Azure.ResourceManager.SecurityCente { public AadSolutionProperties() { } public Azure.ResourceManager.SecurityCenter.Models.AadConnectivityStateType? ConnectivityState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AadSolutionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AadSolutionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3344,6 +3399,7 @@ public ActionableRemediation() { } public System.Collections.Generic.IList CategoryConfigurations { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.InheritFromParentState? InheritFromParentState { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.ActionableRemediationState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ActionableRemediation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ActionableRemediation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3372,6 +3428,7 @@ public ActionableRemediation() { } public partial class ActiveConnectionsNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ActiveConnectionsNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ActiveConnectionsNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ActiveConnectionsNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3445,6 +3502,7 @@ public partial class AdaptiveApplicationControlIssueSummary : System.ClientModel internal AdaptiveApplicationControlIssueSummary() { } public Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssue? Issue { get { throw null; } } public float? NumberOfVms { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssueSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssueSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3456,6 +3514,7 @@ public partial class AdaptiveNetworkHardeningEnforceContent : System.ClientModel public AdaptiveNetworkHardeningEnforceContent(System.Collections.Generic.IEnumerable rules, System.Collections.Generic.IEnumerable networkSecurityGroups) { } public System.Collections.Generic.IList NetworkSecurityGroups { get { throw null; } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AdaptiveNetworkHardeningEnforceContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AdaptiveNetworkHardeningEnforceContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3486,6 +3545,7 @@ public AdditionalWorkspacesProperties() { } public System.Collections.Generic.IList DataTypes { get { throw null; } } public string Workspace { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.AdditionalWorkspaceType? WorkspaceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AdditionalWorkspacesProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AdditionalWorkspacesProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3513,6 +3573,7 @@ public partial class AllowlistCustomAlertRule : Azure.ResourceManager.SecurityCe { public AllowlistCustomAlertRule(bool isEnabled, System.Collections.Generic.IEnumerable allowlistValues) : base (default(bool)) { } public System.Collections.Generic.IList AllowlistValues { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AllowlistCustomAlertRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AllowlistCustomAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3522,6 +3583,7 @@ public AllowlistCustomAlertRule(bool isEnabled, System.Collections.Generic.IEnum public partial class AmqpC2DMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AmqpC2DMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AmqpC2DMessagesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AmqpC2DMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3531,6 +3593,7 @@ public partial class AmqpC2DMessagesNotInAllowedRange : Azure.ResourceManager.Se public partial class AmqpC2DRejectedMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AmqpC2DRejectedMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AmqpC2DRejectedMessagesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AmqpC2DRejectedMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3540,6 +3603,7 @@ public partial class AmqpC2DRejectedMessagesNotInAllowedRange : Azure.ResourceMa public partial class AmqpD2CMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AmqpD2CMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AmqpD2CMessagesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AmqpD2CMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3763,6 +3827,7 @@ public partial class AtaExternalSecuritySolution : Azure.ResourceManager.Securit { public AtaExternalSecuritySolution() { } public Azure.ResourceManager.SecurityCenter.Models.AtaSolutionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AtaExternalSecuritySolution System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AtaExternalSecuritySolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3773,6 +3838,7 @@ public partial class AtaSolutionProperties : Azure.ResourceManager.SecurityCente { public AtaSolutionProperties() { } public string LastEventReceived { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AtaSolutionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AtaSolutionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3784,6 +3850,7 @@ public abstract partial class AuthenticationDetailsProperties : System.ClientMod protected AuthenticationDetailsProperties() { } public Azure.ResourceManager.SecurityCenter.Models.AuthenticationProvisioningState? AuthenticationProvisioningState { get { throw null; } } public System.Collections.Generic.IReadOnlyList GrantedPermissions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AuthenticationDetailsProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AuthenticationDetailsProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3897,6 +3964,7 @@ public AwsAssumeRoleAuthenticationDetailsProperties(string awsAssumeRoleArn, Sys public string AccountId { get { throw null; } } public string AwsAssumeRoleArn { get { throw null; } set { } } public System.Guid AwsExternalId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AwsAssumeRoleAuthenticationDetailsProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AwsAssumeRoleAuthenticationDetailsProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3909,6 +3977,7 @@ public AwsCredsAuthenticationDetailsProperties(string awsAccessKeyId, string aws public string AccountId { get { throw null; } } public string AwsAccessKeyId { get { throw null; } set { } } public string AwsSecretAccessKey { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AwsCredsAuthenticationDetailsProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AwsCredsAuthenticationDetailsProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3922,6 +3991,7 @@ public AwsEnvironment() { } public Azure.ResourceManager.SecurityCenter.Models.AwsOrganizationalInfo OrganizationalData { get { throw null; } set { } } public System.Collections.Generic.IList Regions { get { throw null; } } public long? ScanInterval { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AwsEnvironment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AwsEnvironment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3933,6 +4003,7 @@ public partial class AwsOrganizationalDataMaster : Azure.ResourceManager.Securit public AwsOrganizationalDataMaster() { } public System.Collections.Generic.IList ExcludedAccountIds { get { throw null; } } public string StacksetName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AwsOrganizationalDataMaster System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AwsOrganizationalDataMaster System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3943,6 +4014,7 @@ public partial class AwsOrganizationalDataMember : Azure.ResourceManager.Securit { public AwsOrganizationalDataMember() { } public string ParentHierarchyId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AwsOrganizationalDataMember System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AwsOrganizationalDataMember System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3952,6 +4024,7 @@ public AwsOrganizationalDataMember() { } public abstract partial class AwsOrganizationalInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected AwsOrganizationalInfo() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AwsOrganizationalInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AwsOrganizationalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3961,6 +4034,7 @@ protected AwsOrganizationalInfo() { } public partial class AzureDevOpsScopeEnvironment : Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorEnvironment, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AzureDevOpsScopeEnvironment() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AzureDevOpsScopeEnvironment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AzureDevOpsScopeEnvironment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3971,6 +4045,7 @@ public partial class AzureResourceDetails : Azure.ResourceManager.SecurityCenter { public AzureResourceDetails() { } public string Id { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AzureResourceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AzureResourceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3981,6 +4056,7 @@ public partial class AzureResourceIdentifier : Azure.ResourceManager.SecurityCen { internal AzureResourceIdentifier() { } public Azure.Core.ResourceIdentifier AzureResourceId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AzureResourceIdentifier System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AzureResourceIdentifier System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3991,6 +4067,7 @@ public partial class AzureServersSetting : Azure.ResourceManager.SecurityCenter. { public AzureServersSetting() { } public Azure.ResourceManager.SecurityCenter.Models.ServerVulnerabilityAssessmentsAzureSettingSelectedProvider? SelectedProvider { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AzureServersSetting System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.AzureServersSetting System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4004,6 +4081,7 @@ public BaselineAdjustedResult() { } public System.Collections.Generic.IList> ResultsNotInBaseline { get { throw null; } } public System.Collections.Generic.IList> ResultsOnlyInBaseline { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanResultRuleStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.BaselineAdjustedResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.BaselineAdjustedResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4015,6 +4093,7 @@ public partial class BenchmarkReference : System.ClientModel.Primitives.IJsonMod public BenchmarkReference() { } public string Benchmark { get { throw null; } set { } } public string Reference { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.BenchmarkReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.BenchmarkReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4027,6 +4106,7 @@ internal BuiltInInfoType() { } public string BuiltInInfoTypeValue { get { throw null; } } public System.Guid? Id { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.BuiltInInfoType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.BuiltInInfoType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4038,6 +4118,7 @@ public partial class CategoryConfiguration : System.ClientModel.Primitives.IJson public CategoryConfiguration() { } public Azure.ResourceManager.SecurityCenter.Models.RuleCategory? Category { get { throw null; } set { } } public string MinimumSeverityLevel { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CategoryConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CategoryConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4048,6 +4129,7 @@ public partial class CefExternalSecuritySolution : Azure.ResourceManager.Securit { public CefExternalSecuritySolution() { } public Azure.ResourceManager.SecurityCenter.Models.CefSolutionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CefExternalSecuritySolution System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CefExternalSecuritySolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4060,6 +4142,7 @@ public CefSolutionProperties() { } public string Agent { get { throw null; } set { } } public string Hostname { get { throw null; } set { } } public string LastEventReceived { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CefSolutionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CefSolutionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4071,6 +4154,7 @@ public partial class ComplianceSegment : System.ClientModel.Primitives.IJsonMode internal ComplianceSegment() { } public double? Percentage { get { throw null; } } public string SegmentType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ComplianceSegment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ComplianceSegment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4083,6 +4167,7 @@ internal ConnectableResourceInfo() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public System.Collections.Generic.IReadOnlyList InboundConnectedResources { get { throw null; } } public System.Collections.Generic.IReadOnlyList OutboundConnectedResources { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ConnectableResourceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ConnectableResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4095,6 +4180,7 @@ internal ConnectedResourceInfo() { } public Azure.Core.ResourceIdentifier ConnectedResourceId { get { throw null; } } public string TcpPorts { get { throw null; } } public string UdpPorts { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ConnectedResourceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ConnectedResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4104,6 +4190,7 @@ internal ConnectedResourceInfo() { } public partial class ConnectionFromIPNotAllowed : Azure.ResourceManager.SecurityCenter.Models.AllowlistCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ConnectionFromIPNotAllowed(bool isEnabled, System.Collections.Generic.IEnumerable allowlistValues) : base (default(bool), default(System.Collections.Generic.IEnumerable)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ConnectionFromIPNotAllowed System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ConnectionFromIPNotAllowed System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4113,6 +4200,7 @@ public partial class ConnectionFromIPNotAllowed : Azure.ResourceManager.Security public partial class ConnectionToIPNotAllowed : Azure.ResourceManager.SecurityCenter.Models.AllowlistCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ConnectionToIPNotAllowed(bool isEnabled, System.Collections.Generic.IEnumerable allowlistValues) : base (default(bool), default(System.Collections.Generic.IEnumerable)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ConnectionToIPNotAllowed System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ConnectionToIPNotAllowed System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4130,6 +4218,7 @@ public ContainerRegistryVulnerabilityProperties() { } public System.DateTimeOffset? PublishedOn { get { throw null; } } public string RepositoryName { get { throw null; } } public System.Collections.Generic.IReadOnlyList VendorReferences { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ContainerRegistryVulnerabilityProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ContainerRegistryVulnerabilityProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4140,6 +4229,7 @@ public partial class CspmMonitorAwsOffering : Azure.ResourceManager.SecurityCent { public CspmMonitorAwsOffering() { } public string CloudRoleArn { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CspmMonitorAwsOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CspmMonitorAwsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4149,6 +4239,7 @@ public CspmMonitorAwsOffering() { } public partial class CspmMonitorAzureDevOpsOffering : Azure.ResourceManager.SecurityCenter.Models.SecurityCenterCloudOffering, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CspmMonitorAzureDevOpsOffering() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CspmMonitorAzureDevOpsOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CspmMonitorAzureDevOpsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4159,6 +4250,7 @@ public partial class CspmMonitorGcpOffering : Azure.ResourceManager.SecurityCent { public CspmMonitorGcpOffering() { } public Azure.ResourceManager.SecurityCenter.Models.CspmMonitorGcpOfferingNativeCloudConnection NativeCloudConnection { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CspmMonitorGcpOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CspmMonitorGcpOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4170,6 +4262,7 @@ public partial class CspmMonitorGcpOfferingNativeCloudConnection : System.Client public CspmMonitorGcpOfferingNativeCloudConnection() { } public string ServiceAccountEmailAddress { get { throw null; } set { } } public string WorkloadIdentityProviderId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CspmMonitorGcpOfferingNativeCloudConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CspmMonitorGcpOfferingNativeCloudConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4179,6 +4272,7 @@ public CspmMonitorGcpOfferingNativeCloudConnection() { } public partial class CspmMonitorGithubOffering : Azure.ResourceManager.SecurityCenter.Models.SecurityCenterCloudOffering, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CspmMonitorGithubOffering() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CspmMonitorGithubOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CspmMonitorGithubOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4188,6 +4282,7 @@ public CspmMonitorGithubOffering() { } public partial class CspmMonitorGitLabOffering : Azure.ResourceManager.SecurityCenter.Models.SecurityCenterCloudOffering, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CspmMonitorGitLabOffering() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CspmMonitorGitLabOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CspmMonitorGitLabOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4200,6 +4295,7 @@ protected CustomAlertRule(bool isEnabled) { } public string Description { get { throw null; } } public string DisplayName { get { throw null; } } public bool IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CustomAlertRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CustomAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4215,6 +4311,7 @@ public CustomAssessmentAutomationCreateOrUpdateContent() { } public string RemediationDescription { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentSeverity? Severity { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationSupportedCloud? SupportedCloud { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4262,6 +4359,7 @@ public partial class CustomEntityStoreAssignmentCreateOrUpdateContent : System.C { public CustomEntityStoreAssignmentCreateOrUpdateContent() { } public string Principal { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CustomEntityStoreAssignmentCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.CustomEntityStoreAssignmentCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4272,6 +4370,7 @@ public partial class DataExportSettings : Azure.ResourceManager.SecurityCenter.S { public DataExportSettings() { } public bool? IsEnabled { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DataExportSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DataExportSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4287,6 +4386,7 @@ public DefenderCspmAwsOffering() { } public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S MdcContainersAgentlessDiscoveryK8S { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingMdcContainersImageAssessment MdcContainersImageAssessment { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingVmScanners VmScanners { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4298,6 +4398,7 @@ public partial class DefenderCspmAwsOfferingCiem : System.ClientModel.Primitives public DefenderCspmAwsOfferingCiem() { } public string CiemDiscoveryCloudRoleArn { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingCiemOidc CiemOidc { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingCiem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingCiem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4309,6 +4410,7 @@ public partial class DefenderCspmAwsOfferingCiemOidc : System.ClientModel.Primit public DefenderCspmAwsOfferingCiemOidc() { } public string AzureActiveDirectoryAppName { get { throw null; } set { } } public string CloudRoleArn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingCiemOidc System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingCiemOidc System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4320,6 +4422,7 @@ public partial class DefenderCspmAwsOfferingDatabasesDspm : System.ClientModel.P public DefenderCspmAwsOfferingDatabasesDspm() { } public string CloudRoleArn { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingDatabasesDspm System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingDatabasesDspm System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4331,6 +4434,7 @@ public partial class DefenderCspmAwsOfferingDataSensitivityDiscovery : System.Cl public DefenderCspmAwsOfferingDataSensitivityDiscovery() { } public string CloudRoleArn { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingDataSensitivityDiscovery System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingDataSensitivityDiscovery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4342,6 +4446,7 @@ public partial class DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S : public DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S() { } public string CloudRoleArn { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4353,6 +4458,7 @@ public partial class DefenderCspmAwsOfferingMdcContainersImageAssessment : Syste public DefenderCspmAwsOfferingMdcContainersImageAssessment() { } public string CloudRoleArn { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingMdcContainersImageAssessment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingMdcContainersImageAssessment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4364,6 +4470,7 @@ public partial class DefenderCspmAwsOfferingVmScanners : System.ClientModel.Prim public DefenderCspmAwsOfferingVmScanners() { } public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingVmScannersConfiguration Configuration { get { throw null; } set { } } public bool? Enabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingVmScanners System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingVmScanners System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4376,6 +4483,7 @@ public DefenderCspmAwsOfferingVmScannersConfiguration() { } public string CloudRoleArn { get { throw null; } set { } } public System.Collections.Generic.IDictionary ExclusionTags { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersScanningMode? ScanningMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingVmScannersConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingVmScannersConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4390,6 +4498,7 @@ public DefenderCspmGcpOffering() { } public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S MdcContainersAgentlessDiscoveryK8S { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingMdcContainersImageAssessment MdcContainersImageAssessment { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingVmScanners VmScanners { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4402,6 +4511,7 @@ public DefenderCspmGcpOfferingCiemDiscovery() { } public string AzureActiveDirectoryAppName { get { throw null; } set { } } public string ServiceAccountEmailAddress { get { throw null; } set { } } public string WorkloadIdentityProviderId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingCiemDiscovery System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingCiemDiscovery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4414,6 +4524,7 @@ public DefenderCspmGcpOfferingDataSensitivityDiscovery() { } public bool? IsEnabled { get { throw null; } set { } } public string ServiceAccountEmailAddress { get { throw null; } set { } } public string WorkloadIdentityProviderId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingDataSensitivityDiscovery System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingDataSensitivityDiscovery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4426,6 +4537,7 @@ public DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S() { } public bool? IsEnabled { get { throw null; } set { } } public string ServiceAccountEmailAddress { get { throw null; } set { } } public string WorkloadIdentityProviderId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4438,6 +4550,7 @@ public DefenderCspmGcpOfferingMdcContainersImageAssessment() { } public bool? IsEnabled { get { throw null; } set { } } public string ServiceAccountEmailAddress { get { throw null; } set { } } public string WorkloadIdentityProviderId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingMdcContainersImageAssessment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingMdcContainersImageAssessment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4449,6 +4562,7 @@ public partial class DefenderCspmGcpOfferingVmScanners : System.ClientModel.Prim public DefenderCspmGcpOfferingVmScanners() { } public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingVmScannersConfiguration Configuration { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingVmScanners System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingVmScanners System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4460,6 +4574,7 @@ public partial class DefenderCspmGcpOfferingVmScannersConfiguration : System.Cli public DefenderCspmGcpOfferingVmScannersConfiguration() { } public System.Collections.Generic.IDictionary ExclusionTags { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersScanningMode? ScanningMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingVmScannersConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingVmScannersConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4471,6 +4586,7 @@ public partial class DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfigurat public DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration() { } public string PrivateLinkScope { get { throw null; } set { } } public string Proxy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4482,6 +4598,7 @@ public partial class DefenderFoDatabasesAwsOfferingDatabasesDspm : System.Client public DefenderFoDatabasesAwsOfferingDatabasesDspm() { } public string CloudRoleArn { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderFoDatabasesAwsOfferingDatabasesDspm System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderFoDatabasesAwsOfferingDatabasesDspm System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4503,6 +4620,7 @@ public DefenderForContainersAwsOffering() { } public Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S MdcContainersAgentlessDiscoveryK8S { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersAwsOfferingMdcContainersImageAssessment MdcContainersImageAssessment { get { throw null; } set { } } public string ScubaExternalId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersAwsOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersAwsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4514,6 +4632,7 @@ public partial class DefenderForContainersAwsOfferingMdcContainersAgentlessDisco public DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S() { } public string CloudRoleArn { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4525,6 +4644,7 @@ public partial class DefenderForContainersAwsOfferingMdcContainersImageAssessmen public DefenderForContainersAwsOfferingMdcContainersImageAssessment() { } public string CloudRoleArn { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersAwsOfferingMdcContainersImageAssessment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersAwsOfferingMdcContainersImageAssessment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4541,6 +4661,7 @@ public DefenderForContainersGcpOffering() { } public Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S MdcContainersAgentlessDiscoveryK8S { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingMdcContainersImageAssessment MdcContainersImageAssessment { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingNativeCloudConnection NativeCloudConnection { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4552,6 +4673,7 @@ public partial class DefenderForContainersGcpOfferingDataPipelineNativeCloudConn public DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection() { } public string ServiceAccountEmailAddress { get { throw null; } set { } } public string WorkloadIdentityProviderId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4564,6 +4686,7 @@ public DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S() { } public bool? IsEnabled { get { throw null; } set { } } public string ServiceAccountEmailAddress { get { throw null; } set { } } public string WorkloadIdentityProviderId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4576,6 +4699,7 @@ public DefenderForContainersGcpOfferingMdcContainersImageAssessment() { } public bool? IsEnabled { get { throw null; } set { } } public string ServiceAccountEmailAddress { get { throw null; } set { } } public string WorkloadIdentityProviderId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingMdcContainersImageAssessment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingMdcContainersImageAssessment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4587,6 +4711,7 @@ public partial class DefenderForContainersGcpOfferingNativeCloudConnection : Sys public DefenderForContainersGcpOfferingNativeCloudConnection() { } public string ServiceAccountEmailAddress { get { throw null; } set { } } public string WorkloadIdentityProviderId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingNativeCloudConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingNativeCloudConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4599,6 +4724,7 @@ public DefenderForDatabasesAwsOffering() { } public Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesAwsOfferingArcAutoProvisioning ArcAutoProvisioning { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.DefenderFoDatabasesAwsOfferingDatabasesDspm DatabasesDspm { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesAwsOfferingRds Rds { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesAwsOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesAwsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4611,6 +4737,7 @@ public DefenderForDatabasesAwsOfferingArcAutoProvisioning() { } public string CloudRoleArn { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration Configuration { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesAwsOfferingArcAutoProvisioning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesAwsOfferingArcAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4622,6 +4749,7 @@ public partial class DefenderForDatabasesAwsOfferingRds : System.ClientModel.Pri public DefenderForDatabasesAwsOfferingRds() { } public string CloudRoleArn { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesAwsOfferingRds System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesAwsOfferingRds System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4633,6 +4761,7 @@ public partial class DefenderForDatabasesGcpOffering : Azure.ResourceManager.Sec public DefenderForDatabasesGcpOffering() { } public Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesGcpOfferingArcAutoProvisioning ArcAutoProvisioning { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.GcpDefenderForDatabasesArcAutoProvisioning DefenderForDatabasesArcAutoProvisioning { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesGcpOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesGcpOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4644,6 +4773,7 @@ public partial class DefenderForDatabasesGcpOfferingArcAutoProvisioning : System public DefenderForDatabasesGcpOfferingArcAutoProvisioning() { } public Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration Configuration { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesGcpOfferingArcAutoProvisioning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesGcpOfferingArcAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4655,6 +4785,7 @@ public partial class DefenderForDatabasesGcpOfferingArcAutoProvisioningConfigura public DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration() { } public string PrivateLinkScope { get { throw null; } set { } } public string Proxy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4664,6 +4795,7 @@ public DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration() { } public partial class DefenderForDevOpsAzureDevOpsOffering : Azure.ResourceManager.SecurityCenter.Models.SecurityCenterCloudOffering, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DefenderForDevOpsAzureDevOpsOffering() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForDevOpsAzureDevOpsOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForDevOpsAzureDevOpsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4673,6 +4805,7 @@ public DefenderForDevOpsAzureDevOpsOffering() { } public partial class DefenderForDevOpsGithubOffering : Azure.ResourceManager.SecurityCenter.Models.SecurityCenterCloudOffering, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DefenderForDevOpsGithubOffering() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForDevOpsGithubOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForDevOpsGithubOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4682,6 +4815,7 @@ public DefenderForDevOpsGithubOffering() { } public partial class DefenderForDevOpsGitLabOffering : Azure.ResourceManager.SecurityCenter.Models.SecurityCenterCloudOffering, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DefenderForDevOpsGitLabOffering() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForDevOpsGitLabOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForDevOpsGitLabOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4697,6 +4831,7 @@ public DefenderForServersAwsOffering() { } public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingMdeAutoProvisioning MdeAutoProvisioning { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning VaAutoProvisioning { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVmScanners VmScanners { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4709,6 +4844,7 @@ public DefenderForServersAwsOfferingArcAutoProvisioning() { } public string CloudRoleArn { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingArcAutoProvisioningConfiguration Configuration { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingArcAutoProvisioning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingArcAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4720,6 +4856,7 @@ public partial class DefenderForServersAwsOfferingArcAutoProvisioningConfigurati public DefenderForServersAwsOfferingArcAutoProvisioningConfiguration() { } public string PrivateLinkScope { get { throw null; } set { } } public string Proxy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingArcAutoProvisioningConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingArcAutoProvisioningConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4731,6 +4868,7 @@ public partial class DefenderForServersAwsOfferingMdeAutoProvisioning : System.C public DefenderForServersAwsOfferingMdeAutoProvisioning() { } public System.BinaryData Configuration { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingMdeAutoProvisioning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingMdeAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4742,6 +4880,7 @@ public partial class DefenderForServersAwsOfferingVmScanners : System.ClientMode public DefenderForServersAwsOfferingVmScanners() { } public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVmScannersConfiguration Configuration { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVmScanners System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVmScanners System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4754,6 +4893,7 @@ public DefenderForServersAwsOfferingVmScannersConfiguration() { } public string CloudRoleArn { get { throw null; } set { } } public System.Collections.Generic.IDictionary ExclusionTags { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersScanningMode? ScanningMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVmScannersConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVmScannersConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4765,6 +4905,7 @@ public partial class DefenderForServersAwsOfferingVulnerabilityAssessmentAutoPro public DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning() { } public bool? IsEnabled { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.VulnerabilityAssessmentAutoProvisioningType? VulnerabilityAssessmentAutoProvisioningType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4781,6 +4922,7 @@ public DefenderForServersGcpOffering() { } public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingMdeAutoProvisioning MdeAutoProvisioning { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVmScanners VmScanners { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning VulnerabilityAssessmentAutoProvisioning { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4792,6 +4934,7 @@ public partial class DefenderForServersGcpOfferingArcAutoProvisioning : System.C public DefenderForServersGcpOfferingArcAutoProvisioning() { } public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingArcAutoProvisioningConfiguration Configuration { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingArcAutoProvisioning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingArcAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4803,6 +4946,7 @@ public partial class DefenderForServersGcpOfferingArcAutoProvisioningConfigurati public DefenderForServersGcpOfferingArcAutoProvisioningConfiguration() { } public string PrivateLinkScope { get { throw null; } set { } } public string Proxy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingArcAutoProvisioningConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingArcAutoProvisioningConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4814,6 +4958,7 @@ public partial class DefenderForServersGcpOfferingMdeAutoProvisioning : System.C public DefenderForServersGcpOfferingMdeAutoProvisioning() { } public System.BinaryData Configuration { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingMdeAutoProvisioning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingMdeAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4825,6 +4970,7 @@ public partial class DefenderForServersGcpOfferingVmScanners : System.ClientMode public DefenderForServersGcpOfferingVmScanners() { } public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVmScannersConfiguration Configuration { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVmScanners System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVmScanners System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4836,6 +4982,7 @@ public partial class DefenderForServersGcpOfferingVmScannersConfiguration : Syst public DefenderForServersGcpOfferingVmScannersConfiguration() { } public System.Collections.Generic.IDictionary ExclusionTags { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersScanningMode? ScanningMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVmScannersConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVmScannersConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4847,6 +4994,7 @@ public partial class DefenderForServersGcpOfferingVulnerabilityAssessmentAutoPro public DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning() { } public bool? IsEnabled { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.VulnerabilityAssessmentAutoProvisioningType? VulnerabilityAssessmentAutoProvisioningType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4891,6 +5039,7 @@ public partial class DenylistCustomAlertRule : Azure.ResourceManager.SecurityCen { public DenylistCustomAlertRule(bool isEnabled, System.Collections.Generic.IEnumerable denylistValues) : base (default(bool)) { } public System.Collections.Generic.IList DenylistValues { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DenylistCustomAlertRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DenylistCustomAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4925,6 +5074,7 @@ public DevOpsConfigurationProperties() { } public string ProvisioningStatusMessage { get { throw null; } } public System.DateTimeOffset? ProvisioningStatusUpdateTimeUtc { get { throw null; } } public System.Collections.Generic.IList TopLevelInventoryList { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DevOpsConfigurationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DevOpsConfigurationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4939,6 +5089,7 @@ public DevOpsOrgProperties() { } public Azure.ResourceManager.SecurityCenter.Models.DevOpsProvisioningState? ProvisioningState { get { throw null; } set { } } public string ProvisioningStatusMessage { get { throw null; } } public System.DateTimeOffset? ProvisioningStatusUpdatedOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DevOpsOrgProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DevOpsOrgProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4955,6 +5106,7 @@ public DevOpsProjectProperties() { } public Azure.ResourceManager.SecurityCenter.Models.DevOpsProvisioningState? ProvisioningState { get { throw null; } set { } } public string ProvisioningStatusMessage { get { throw null; } } public System.DateTimeOffset? ProvisioningStatusUpdatedOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DevOpsProjectProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DevOpsProjectProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4997,6 +5149,7 @@ public DevOpsRepositoryProperties() { } public string RepoId { get { throw null; } } public System.Uri RepoUri { get { throw null; } } public string Visibility { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DevOpsRepositoryProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DevOpsRepositoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5006,6 +5159,7 @@ public DevOpsRepositoryProperties() { } public partial class DirectMethodInvokesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DirectMethodInvokesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DirectMethodInvokesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DirectMethodInvokesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5020,6 +5174,7 @@ public DiscoveredSecuritySolution(Azure.ResourceManager.SecurityCenter.Models.Se public string Publisher { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.SecurityFamily SecurityFamily { get { throw null; } set { } } public string Sku { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DiscoveredSecuritySolution System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.DiscoveredSecuritySolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5031,6 +5186,7 @@ public partial class EffectiveNetworkSecurityGroups : System.ClientModel.Primiti public EffectiveNetworkSecurityGroups() { } public string NetworkInterface { get { throw null; } set { } } public System.Collections.Generic.IList NetworkSecurityGroups { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.EffectiveNetworkSecurityGroups System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.EffectiveNetworkSecurityGroups System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5066,6 +5222,7 @@ public EnvironmentDetails() { } public string OrganizationalHierarchyId { get { throw null; } set { } } public string SubscriptionId { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.EnvironmentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.EnvironmentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5076,6 +5233,7 @@ public partial class ExecuteGovernanceRuleParams : System.ClientModel.Primitives { public ExecuteGovernanceRuleParams() { } public bool? Override { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ExecuteGovernanceRuleParams System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ExecuteGovernanceRuleParams System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5097,6 +5255,7 @@ public partial class ExtensionOperationStatus : System.ClientModel.Primitives.IJ internal ExtensionOperationStatus() { } public string Code { get { throw null; } } public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ExtensionOperationStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ExtensionOperationStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5126,6 +5285,7 @@ public partial class ExternalSecuritySolution : Azure.ResourceManager.Models.Res public ExternalSecuritySolution() { } public Azure.ResourceManager.SecurityCenter.Models.ExternalSecuritySolutionKind? Kind { get { throw null; } set { } } public Azure.Core.AzureLocation? Location { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ExternalSecuritySolution System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ExternalSecuritySolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5158,6 +5318,7 @@ public ExternalSecuritySolutionProperties() { } public string DeviceType { get { throw null; } set { } } public string DeviceVendor { get { throw null; } set { } } public Azure.Core.ResourceIdentifier WorkspaceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ExternalSecuritySolutionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ExternalSecuritySolutionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5167,6 +5328,7 @@ public ExternalSecuritySolutionProperties() { } public partial class FailedLocalLoginsNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FailedLocalLoginsNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.FailedLocalLoginsNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.FailedLocalLoginsNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5176,6 +5338,7 @@ public partial class FailedLocalLoginsNotInAllowedRange : Azure.ResourceManager. public partial class FileUploadsNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FileUploadsNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.FileUploadsNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.FileUploadsNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5196,6 +5359,7 @@ public GcpCredentialsDetailsProperties(string organizationId, string gcpCredenti public string PrivateKeyId { get { throw null; } set { } } public string ProjectId { get { throw null; } set { } } public System.Uri TokenUri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GcpCredentialsDetailsProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GcpCredentialsDetailsProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5207,6 +5371,7 @@ public partial class GcpDefenderForDatabasesArcAutoProvisioning : System.ClientM public GcpDefenderForDatabasesArcAutoProvisioning() { } public string ServiceAccountEmailAddress { get { throw null; } set { } } public string WorkloadIdentityProviderId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GcpDefenderForDatabasesArcAutoProvisioning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GcpDefenderForDatabasesArcAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5218,6 +5383,7 @@ public partial class GcpDefenderForServersInfo : System.ClientModel.Primitives.I public GcpDefenderForServersInfo() { } public string ServiceAccountEmailAddress { get { throw null; } set { } } public string WorkloadIdentityProviderId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GcpDefenderForServersInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GcpDefenderForServersInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5229,6 +5395,7 @@ public partial class GcpMemberOrganizationalInfo : Azure.ResourceManager.Securit public GcpMemberOrganizationalInfo() { } public string ManagementProjectNumber { get { throw null; } set { } } public string ParentHierarchyId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GcpMemberOrganizationalInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GcpMemberOrganizationalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5238,6 +5405,7 @@ public GcpMemberOrganizationalInfo() { } public abstract partial class GcpOrganizationalInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected GcpOrganizationalInfo() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GcpOrganizationalInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GcpOrganizationalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5251,6 +5419,7 @@ public GcpParentOrganizationalInfo() { } public string OrganizationName { get { throw null; } } public string ServiceAccountEmailAddress { get { throw null; } set { } } public string WorkloadIdentityProviderId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GcpParentOrganizationalInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GcpParentOrganizationalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5264,6 +5433,7 @@ public GcpProjectDetails() { } public string ProjectName { get { throw null; } } public string ProjectNumber { get { throw null; } set { } } public string WorkloadIdentityPoolId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GcpProjectDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GcpProjectDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5276,6 +5446,7 @@ public GcpProjectEnvironment() { } public Azure.ResourceManager.SecurityCenter.Models.GcpOrganizationalInfo OrganizationalData { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.GcpProjectDetails ProjectDetails { get { throw null; } set { } } public long? ScanInterval { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GcpProjectEnvironment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GcpProjectEnvironment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5289,6 +5460,7 @@ internal GetSensitivitySettingsResponsePropertiesMipInformation() { } public System.Collections.Generic.IReadOnlyList CustomInfoTypes { get { throw null; } } public System.Collections.Generic.IReadOnlyList Labels { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.MipIntegrationStatus? MipIntegrationStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GetSensitivitySettingsResponsePropertiesMipInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GetSensitivitySettingsResponsePropertiesMipInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5298,6 +5470,7 @@ internal GetSensitivitySettingsResponsePropertiesMipInformation() { } public partial class GithubScopeEnvironment : Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorEnvironment, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public GithubScopeEnvironment() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GithubScopeEnvironment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GithubScopeEnvironment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5307,6 +5480,7 @@ public GithubScopeEnvironment() { } public partial class GitlabScopeEnvironment : Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorEnvironment, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public GitlabScopeEnvironment() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GitlabScopeEnvironment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GitlabScopeEnvironment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5319,6 +5493,7 @@ public GovernanceAssignmentAdditionalInfo() { } public string TicketLink { get { throw null; } set { } } public int? TicketNumber { get { throw null; } set { } } public string TicketStatus { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GovernanceAssignmentAdditionalInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GovernanceAssignmentAdditionalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5330,6 +5505,7 @@ public partial class GovernanceEmailNotification : System.ClientModel.Primitives public GovernanceEmailNotification() { } public bool? IsManagerEmailNotificationDisabled { get { throw null; } set { } } public bool? IsOwnerEmailNotificationDisabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GovernanceEmailNotification System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GovernanceEmailNotification System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5341,6 +5517,7 @@ public partial class GovernanceRuleEmailNotification : System.ClientModel.Primit public GovernanceRuleEmailNotification() { } public bool? IsManagerEmailNotificationDisabled { get { throw null; } set { } } public bool? IsOwnerEmailNotificationDisabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GovernanceRuleEmailNotification System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GovernanceRuleEmailNotification System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5354,6 +5531,7 @@ public GovernanceRuleMetadata() { } public System.DateTimeOffset? CreatedOn { get { throw null; } } public string UpdatedBy { get { throw null; } } public System.DateTimeOffset? UpdatedOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GovernanceRuleMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GovernanceRuleMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5365,6 +5543,7 @@ public partial class GovernanceRuleOwnerSource : System.ClientModel.Primitives.I public GovernanceRuleOwnerSource() { } public Azure.ResourceManager.SecurityCenter.Models.GovernanceRuleOwnerSourceType? SourceType { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GovernanceRuleOwnerSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.GovernanceRuleOwnerSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5430,6 +5609,7 @@ public HealthDataClassification() { } public string Component { get { throw null; } set { } } public string Scenario { get { throw null; } set { } } public string Scope { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.HealthDataClassification System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.HealthDataClassification System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5442,6 +5622,7 @@ public HealthReportResourceDetails() { } public string ConnectorId { get { throw null; } } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.HealthReportSource? Source { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.HealthReportResourceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.HealthReportResourceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5475,6 +5656,7 @@ public HealthReportStatus() { } public System.DateTimeOffset? LastScannedOn { get { throw null; } } public string Reason { get { throw null; } } public System.DateTimeOffset? StatusChangeOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.HealthReportStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.HealthReportStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5503,6 +5685,7 @@ public HealthReportStatus() { } public partial class HttpC2DMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public HttpC2DMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.HttpC2DMessagesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.HttpC2DMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5512,6 +5695,7 @@ public partial class HttpC2DMessagesNotInAllowedRange : Azure.ResourceManager.Se public partial class HttpC2DRejectedMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public HttpC2DRejectedMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.HttpC2DRejectedMessagesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.HttpC2DRejectedMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5521,6 +5705,7 @@ public partial class HttpC2DRejectedMessagesNotInAllowedRange : Azure.ResourceMa public partial class HttpD2CMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public HttpD2CMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.HttpD2CMessagesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.HttpD2CMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5555,6 +5740,7 @@ public HybridComputeSettingsProperties(Azure.ResourceManager.SecurityCenter.Mode public string Region { get { throw null; } set { } } public string ResourceGroupName { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.ServicePrincipalProperties ServicePrincipal { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.HybridComputeSettingsProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.HybridComputeSettingsProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5584,6 +5770,7 @@ public partial class InformationProtectionAwsOffering : Azure.ResourceManager.Se { public InformationProtectionAwsOffering() { } public string InformationProtectionCloudRoleArn { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.InformationProtectionAwsOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.InformationProtectionAwsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5597,6 +5784,7 @@ public InformationProtectionKeyword() { } public bool? Custom { get { throw null; } set { } } public bool? Excluded { get { throw null; } set { } } public string Pattern { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.InformationProtectionKeyword System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.InformationProtectionKeyword System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5610,6 +5798,7 @@ public InformationProtectionPolicy() { } public System.Collections.Generic.IDictionary Labels { get { throw null; } } public System.DateTimeOffset? LastModifiedUtc { get { throw null; } } public string Version { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.InformationProtectionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.InformationProtectionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5658,6 +5847,7 @@ internal IotSecurityAggregatedAlertTopDevice() { } public long? AlertsCount { get { throw null; } } public string DeviceId { get { throw null; } } public string LastOccurrence { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.IotSecurityAggregatedAlertTopDevice System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.IotSecurityAggregatedAlertTopDevice System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5669,6 +5859,7 @@ public partial class IotSecurityAlertedDevice : System.ClientModel.Primitives.IJ public IotSecurityAlertedDevice() { } public long? AlertsCount { get { throw null; } } public string DeviceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.IotSecurityAlertedDevice System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.IotSecurityAlertedDevice System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5681,6 +5872,7 @@ public IotSecurityDeviceAlert() { } public string AlertDisplayName { get { throw null; } } public long? AlertsCount { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.ReportedSeverity? ReportedSeverity { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.IotSecurityDeviceAlert System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.IotSecurityDeviceAlert System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5693,6 +5885,7 @@ public IotSecurityDeviceRecommendation() { } public long? DevicesCount { get { throw null; } } public string RecommendationDisplayName { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.ReportedSeverity? ReportedSeverity { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.IotSecurityDeviceRecommendation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.IotSecurityDeviceRecommendation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5736,6 +5929,7 @@ public partial class IotSecuritySolutionAnalyticsModelDevicesMetrics : System.Cl internal IotSecuritySolutionAnalyticsModelDevicesMetrics() { } public System.DateTimeOffset? Date { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.IotSeverityMetrics DevicesMetrics { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.IotSecuritySolutionAnalyticsModelDevicesMetrics System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.IotSecuritySolutionAnalyticsModelDevicesMetrics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5781,6 +5975,7 @@ public partial class IotSecuritySolutionPatch : Azure.ResourceManager.SecurityCe public IotSecuritySolutionPatch() { } public System.Collections.Generic.IList RecommendationsConfiguration { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.UserDefinedResourcesProperties UserDefinedResources { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.IotSecuritySolutionPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.IotSecuritySolutionPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5793,6 +5988,7 @@ internal IotSeverityMetrics() { } public long? High { get { throw null; } } public long? Low { get { throw null; } } public long? Medium { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.IotSeverityMetrics System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.IotSeverityMetrics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5822,6 +6018,7 @@ public partial class JitNetworkAccessPolicyInitiateContent : System.ClientModel. public JitNetworkAccessPolicyInitiateContent(System.Collections.Generic.IEnumerable virtualMachines) { } public string Justification { get { throw null; } set { } } public System.Collections.Generic.IList VirtualMachines { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPolicyInitiateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPolicyInitiateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5834,6 +6031,7 @@ public JitNetworkAccessPolicyInitiatePort(int number, System.DateTimeOffset endO public string AllowedSourceAddressPrefix { get { throw null; } set { } } public System.DateTimeOffset EndOn { get { throw null; } } public int Number { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPolicyInitiatePort System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPolicyInitiatePort System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5845,6 +6043,7 @@ public partial class JitNetworkAccessPolicyInitiateVirtualMachine : System.Clien public JitNetworkAccessPolicyInitiateVirtualMachine(Azure.Core.ResourceIdentifier id, System.Collections.Generic.IEnumerable ports) { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public System.Collections.Generic.IList Ports { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPolicyInitiateVirtualMachine System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPolicyInitiateVirtualMachine System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5857,6 +6056,7 @@ public JitNetworkAccessPolicyVirtualMachine(Azure.Core.ResourceIdentifier id, Sy public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } public System.Collections.Generic.IList Ports { get { throw null; } } public string PublicIPAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPolicyVirtualMachine System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPolicyVirtualMachine System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5890,6 +6090,7 @@ public JitNetworkAccessPortRule(int number, Azure.ResourceManager.SecurityCenter public System.TimeSpan MaxRequestAccessDuration { get { throw null; } set { } } public int Number { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPortProtocol Protocol { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPortRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPortRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5940,6 +6141,7 @@ public JitNetworkAccessRequestInfo(System.Collections.Generic.IEnumerable VirtualMachines { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessRequestInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessRequestInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5956,6 +6158,7 @@ public JitNetworkAccessRequestPort(int number, System.DateTimeOffset endOn, Azur public int Number { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPortStatus Status { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPortStatusReason StatusReason { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessRequestPort System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessRequestPort System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5967,6 +6170,7 @@ public partial class JitNetworkAccessRequestVirtualMachine : System.ClientModel. public JitNetworkAccessRequestVirtualMachine(Azure.Core.ResourceIdentifier id, System.Collections.Generic.IEnumerable ports) { } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } public System.Collections.Generic.IList Ports { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessRequestVirtualMachine System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessRequestVirtualMachine System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6009,6 +6213,7 @@ public partial class ListCustomAlertRule : Azure.ResourceManager.SecurityCenter. { public ListCustomAlertRule(bool isEnabled) : base (default(bool)) { } public Azure.ResourceManager.SecurityCenter.Models.SecurityValueType? ValueType { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ListCustomAlertRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ListCustomAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6018,6 +6223,7 @@ public ListCustomAlertRule(bool isEnabled) : base (default(bool)) { } public partial class LocalUserNotAllowed : Azure.ResourceManager.SecurityCenter.Models.AllowlistCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public LocalUserNotAllowed(bool isEnabled, System.Collections.Generic.IEnumerable allowlistValues) : base (default(bool), default(System.Collections.Generic.IEnumerable)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.LocalUserNotAllowed System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.LocalUserNotAllowed System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6031,6 +6237,7 @@ internal LogAnalyticsIdentifier() { } public System.Guid? WorkspaceId { get { throw null; } } public string WorkspaceResourceGroup { get { throw null; } } public string WorkspaceSubscriptionId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.LogAnalyticsIdentifier System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.LogAnalyticsIdentifier System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6042,6 +6249,7 @@ public partial class MdeOnboarding : Azure.ResourceManager.Models.ResourceData, public MdeOnboarding() { } public byte[] OnboardingPackageLinux { get { throw null; } set { } } public byte[] OnboardingPackageWindows { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.MdeOnboarding System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.MdeOnboarding System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6074,6 +6282,7 @@ internal MipSensitivityLabel() { } public System.Guid? Id { get { throw null; } } public string Name { get { throw null; } } public float? Order { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.MipSensitivityLabel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.MipSensitivityLabel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6083,6 +6292,7 @@ internal MipSensitivityLabel() { } public partial class MqttC2DMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MqttC2DMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.MqttC2DMessagesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.MqttC2DMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6092,6 +6302,7 @@ public partial class MqttC2DMessagesNotInAllowedRange : Azure.ResourceManager.Se public partial class MqttC2DRejectedMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MqttC2DRejectedMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.MqttC2DRejectedMessagesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.MqttC2DRejectedMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6101,6 +6312,7 @@ public partial class MqttC2DRejectedMessagesNotInAllowedRange : Azure.ResourceMa public partial class MqttD2CMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MqttD2CMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.MqttD2CMessagesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.MqttD2CMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6114,6 +6326,7 @@ public OnPremiseResourceDetails(Azure.Core.ResourceIdentifier workspaceId, Syste public string SourceComputerId { get { throw null; } set { } } public System.Guid VmUuid { get { throw null; } set { } } public Azure.Core.ResourceIdentifier WorkspaceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.OnPremiseResourceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.OnPremiseResourceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6125,6 +6338,7 @@ public partial class OnPremiseSqlResourceDetails : Azure.ResourceManager.Securit public OnPremiseSqlResourceDetails(Azure.Core.ResourceIdentifier workspaceId, System.Guid vmUuid, string sourceComputerId, string machineName, string serverName, string databaseName) : base (default(Azure.Core.ResourceIdentifier), default(System.Guid), default(string), default(string)) { } public string DatabaseName { get { throw null; } set { } } public string ServerName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.OnPremiseSqlResourceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.OnPremiseSqlResourceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6136,6 +6350,7 @@ public partial class OperationStatusAutoGenerated : System.ClientModel.Primitive internal OperationStatusAutoGenerated() { } public Azure.ResourceManager.SecurityCenter.Models.ExtensionOperationStatusCode? Code { get { throw null; } } public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.OperationStatusAutoGenerated System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.OperationStatusAutoGenerated System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6154,6 +6369,7 @@ public PathRecommendation() { } public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterPublisherInfo PublisherInfo { get { throw null; } set { } } public System.Collections.Generic.IList Usernames { get { throw null; } } public System.Collections.Generic.IList UserSids { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.PathRecommendation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.PathRecommendation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6189,6 +6405,7 @@ public PlanExtension(string name, Azure.ResourceManager.SecurityCenter.Models.Is public Azure.ResourceManager.SecurityCenter.Models.IsExtensionEnabled IsEnabled { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.OperationStatusAutoGenerated OperationStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.PlanExtension System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.PlanExtension System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6198,6 +6415,7 @@ public PlanExtension(string name, Azure.ResourceManager.SecurityCenter.Models.Is public partial class ProcessNotAllowed : Azure.ResourceManager.SecurityCenter.Models.AllowlistCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ProcessNotAllowed(bool isEnabled, System.Collections.Generic.IEnumerable allowlistValues) : base (default(bool), default(System.Collections.Generic.IEnumerable)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ProcessNotAllowed System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ProcessNotAllowed System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6209,6 +6427,7 @@ public partial class ProxyServerProperties : System.ClientModel.Primitives.IJson public ProxyServerProperties() { } public string IP { get { throw null; } set { } } public string Port { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ProxyServerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ProxyServerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6218,6 +6437,7 @@ public ProxyServerProperties() { } public partial class QueuePurgesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public QueuePurgesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.QueuePurgesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.QueuePurgesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6267,6 +6487,7 @@ public RecommendationConfigurationProperties(Azure.ResourceManager.SecurityCente public string Name { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.IotSecurityRecommendationType RecommendationType { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.RecommendationConfigStatus Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.RecommendationConfigurationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.RecommendationConfigurationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6301,6 +6522,7 @@ public RecommendedSecurityRule() { } public System.Collections.Generic.IList IPAddresses { get { throw null; } } public string Name { get { throw null; } set { } } public System.Collections.Generic.IList Protocols { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.RecommendedSecurityRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.RecommendedSecurityRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6332,6 +6554,7 @@ public partial class RemediationEta : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.RemediationEta System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6426,6 +6649,7 @@ public partial class RulesResultsContent : System.ClientModel.Primitives.IJsonMo public RulesResultsContent() { } public bool? LatestScan { get { throw null; } set { } } public System.Collections.Generic.IDictionary>> Results { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.RulesResultsContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.RulesResultsContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6440,6 +6664,7 @@ public SecureScoreControlDefinitionItem() { } public string DisplayName { get { throw null; } } public int? MaxScore { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.SecurityControlType? SourceType { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecureScoreControlDefinitionItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecureScoreControlDefinitionItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6458,6 +6683,7 @@ public SecureScoreControlDetails() { } public double? Percentage { get { throw null; } } public int? UnhealthyResourceCount { get { throw null; } } public long? Weight { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecureScoreControlDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecureScoreControlDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6469,6 +6695,7 @@ public partial class SecurityAlertEntity : System.ClientModel.Primitives.IJsonMo internal SecurityAlertEntity() { } public System.Collections.Generic.IReadOnlyDictionary AdditionalProperties { get { throw null; } } public string AlertEntityType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAlertEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAlertEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6553,6 +6780,7 @@ internal SecurityAlertEntity() { } public abstract partial class SecurityAlertResourceIdentifier : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected SecurityAlertResourceIdentifier() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAlertResourceIdentifier System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAlertResourceIdentifier System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6583,6 +6811,7 @@ public partial class SecurityAlertSimulatorBundlesRequestProperties : Azure.Reso { public SecurityAlertSimulatorBundlesRequestProperties() { } public System.Collections.Generic.IList Bundles { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSimulatorBundlesRequestProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSimulatorBundlesRequestProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6618,6 +6847,7 @@ public partial class SecurityAlertSimulatorContent : System.ClientModel.Primitiv { public SecurityAlertSimulatorContent() { } public Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSimulatorRequestProperties Properties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSimulatorContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSimulatorContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6628,6 +6858,7 @@ public partial class SecurityAlertSimulatorRequestProperties : System.ClientMode { public SecurityAlertSimulatorRequestProperties() { } public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSimulatorRequestProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSimulatorRequestProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6665,6 +6896,7 @@ public partial class SecurityAlertSupportingEvidence : System.ClientModel.Primit public SecurityAlertSupportingEvidence() { } public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } } public string SecurityAlertSupportingEvidenceType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSupportingEvidence System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSupportingEvidence System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6675,6 +6907,7 @@ public partial class SecurityAlertSyncSettings : Azure.ResourceManager.SecurityC { public SecurityAlertSyncSettings() { } public bool? IsEnabled { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSyncSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSyncSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6691,6 +6924,7 @@ public SecurityAssessmentCreateOrUpdateContent() { } public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentPartner PartnersData { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterResourceDetails ResourceDetails { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatus Status { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6703,6 +6937,7 @@ public SecurityAssessmentMetadataPartner(string partnerName, string secret) { } public string PartnerName { get { throw null; } set { } } public string ProductName { get { throw null; } set { } } public string Secret { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentMetadataPartner System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentMetadataPartner System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6724,6 +6959,7 @@ public SecurityAssessmentMetadataProperties(string displayName, Azure.ResourceMa public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentSeverity Severity { get { throw null; } set { } } public System.Collections.Generic.IList Threats { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentUserImpact? UserImpact { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentMetadataProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentMetadataProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6753,6 +6989,7 @@ public partial class SecurityAssessmentPartner : System.ClientModel.Primitives.I public SecurityAssessmentPartner(string partnerName, string secret) { } public string PartnerName { get { throw null; } set { } } public string Secret { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentPartner System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentPartner System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6764,6 +7001,7 @@ public partial class SecurityAssessmentPublishDates : System.ClientModel.Primiti public SecurityAssessmentPublishDates(string @public) { } public string GA { get { throw null; } set { } } public string Public { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentPublishDates System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentPublishDates System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6836,6 +7074,7 @@ public SecurityAssessmentStatus(Azure.ResourceManager.SecurityCenter.Models.Secu public string Cause { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatusCode Code { get { throw null; } set { } } public string Description { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6866,6 +7105,7 @@ public partial class SecurityAssessmentStatusResult : Azure.ResourceManager.Secu public SecurityAssessmentStatusResult(Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatusCode code) : base (default(Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatusCode)) { } public System.DateTimeOffset? FirstEvaluatedOn { get { throw null; } } public System.DateTimeOffset? StatusChangeOn { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatusResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatusResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7064,6 +7304,7 @@ public SecurityAssessmentStatusResult(Azure.ResourceManager.SecurityCenter.Model public abstract partial class SecurityAutomationAction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected SecurityAutomationAction() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7076,6 +7317,7 @@ public SecurityAutomationActionEventHub() { } public string ConnectionString { get { throw null; } set { } } public Azure.Core.ResourceIdentifier EventHubResourceId { get { throw null; } set { } } public string SasPolicyName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationActionEventHub System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationActionEventHub System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7087,6 +7329,7 @@ public partial class SecurityAutomationActionLogicApp : Azure.ResourceManager.Se public SecurityAutomationActionLogicApp() { } public Azure.Core.ResourceIdentifier LogicAppResourceId { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationActionLogicApp System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationActionLogicApp System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7097,6 +7340,7 @@ public partial class SecurityAutomationActionWorkspace : Azure.ResourceManager.S { public SecurityAutomationActionWorkspace() { } public Azure.Core.ResourceIdentifier WorkspaceResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationActionWorkspace System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationActionWorkspace System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7107,6 +7351,7 @@ public partial class SecurityAutomationRuleSet : System.ClientModel.Primitives.I { public SecurityAutomationRuleSet() { } public System.Collections.Generic.IList Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationRuleSet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationRuleSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7118,6 +7363,7 @@ public partial class SecurityAutomationScope : System.ClientModel.Primitives.IJs public SecurityAutomationScope() { } public string Description { get { throw null; } set { } } public string ScopePath { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationScope System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationScope System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7129,6 +7375,7 @@ public partial class SecurityAutomationSource : System.ClientModel.Primitives.IJ public SecurityAutomationSource() { } public Azure.ResourceManager.SecurityCenter.Models.SecurityEventSource? EventSource { get { throw null; } set { } } public System.Collections.Generic.IList RuleSets { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7142,6 +7389,7 @@ public SecurityAutomationTriggeringRule() { } public Azure.ResourceManager.SecurityCenter.Models.AutomationTriggeringRuleOperator? Operator { get { throw null; } set { } } public string PropertyJPath { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.AutomationTriggeringRulePropertyType? PropertyType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationTriggeringRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationTriggeringRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7153,6 +7401,7 @@ public partial class SecurityAutomationValidationStatus : System.ClientModel.Pri internal SecurityAutomationValidationStatus() { } public bool? IsValid { get { throw null; } } public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationValidationStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationValidationStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7165,6 +7414,7 @@ public SecurityCenterAllowedConnection() { } public System.DateTimeOffset? CalculatedOn { get { throw null; } } public System.Collections.Generic.IReadOnlyList ConnectableResources { get { throw null; } } public Azure.Core.AzureLocation? Location { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityCenterAllowedConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityCenterAllowedConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7197,6 +7447,7 @@ public abstract partial class SecurityCenterCloudOffering : System.ClientModel.P { protected SecurityCenterCloudOffering() { } public string Description { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityCenterCloudOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityCenterCloudOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7269,6 +7520,7 @@ public SecurityCenterFileProtectionMode() { } public Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode? Executable { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode? Msi { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode? Script { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityCenterFileProtectionMode System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityCenterFileProtectionMode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7300,6 +7552,7 @@ public SecurityCenterPublisherInfo() { } public string ProductName { get { throw null; } set { } } public string PublisherName { get { throw null; } set { } } public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityCenterPublisherInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityCenterPublisherInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7309,6 +7562,7 @@ public SecurityCenterPublisherInfo() { } public abstract partial class SecurityCenterResourceDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected SecurityCenterResourceDetails() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityCenterResourceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityCenterResourceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7319,6 +7573,7 @@ public partial class SecurityCenterTagsResourceInfo : System.ClientModel.Primiti { public SecurityCenterTagsResourceInfo() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityCenterTagsResourceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityCenterTagsResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7347,6 +7602,7 @@ public SecurityCenterTagsResourceInfo() { } public abstract partial class SecurityConnectorEnvironment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected SecurityConnectorEnvironment() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorEnvironment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorEnvironment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7362,6 +7618,7 @@ public SecurityConnectorGitHubOwnerProperties() { } public Azure.ResourceManager.SecurityCenter.Models.DevOpsProvisioningState? ProvisioningState { get { throw null; } set { } } public string ProvisioningStatusMessage { get { throw null; } } public System.DateTimeOffset? ProvisioningStatusUpdateTimeUtc { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitHubOwnerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitHubOwnerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7380,6 +7637,7 @@ public SecurityConnectorGitHubRepositoryProperties() { } public string RepoId { get { throw null; } } public string RepoName { get { throw null; } } public System.Uri RepoUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitHubRepositoryProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitHubRepositoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7396,6 +7654,7 @@ public SecurityConnectorGitLabGroupProperties() { } public string ProvisioningStatusMessage { get { throw null; } } public System.DateTimeOffset? ProvisioningStatusUpdateTimeUtc { get { throw null; } } public System.Uri Uri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitLabGroupProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitLabGroupProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7413,6 +7672,7 @@ public SecurityConnectorGitLabProjectProperties() { } public string ProvisioningStatusMessage { get { throw null; } } public System.DateTimeOffset? ProvisioningStatusUpdateTimeUtc { get { throw null; } } public System.Uri Uri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitLabProjectProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitLabProjectProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7424,6 +7684,7 @@ public partial class SecurityContactPropertiesAlertNotifications : System.Client public SecurityContactPropertiesAlertNotifications() { } public Azure.ResourceManager.SecurityCenter.Models.SecurityAlertMinimalSeverity? MinimalSeverity { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.SecurityAlertNotificationState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityContactPropertiesAlertNotifications System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityContactPropertiesAlertNotifications System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7435,6 +7696,7 @@ public partial class SecurityContactPropertiesNotificationsByRole : System.Clien public SecurityContactPropertiesNotificationsByRole() { } public System.Collections.Generic.IList Roles { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.SecurityAlertNotificationByRoleState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityContactPropertiesNotificationsByRole System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityContactPropertiesNotificationsByRole System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7464,6 +7726,7 @@ public partial class SecurityCve : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityCve System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7474,6 +7737,7 @@ public partial class SecurityCvss : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityCvss System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7556,6 +7820,7 @@ public SecurityHealthReportIssue(string issueKey) { } public string RemediationScript { get { throw null; } set { } } public string RemediationSteps { get { throw null; } set { } } public System.Collections.Generic.IList SecurityValues { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityHealthReportIssue System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityHealthReportIssue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7572,6 +7837,7 @@ public SecurityInformationTypeInfo() { } public System.Collections.Generic.IList Keywords { get { throw null; } } public int? Order { get { throw null; } set { } } public System.Guid? RecommendedLabelId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityInformationTypeInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityInformationTypeInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7624,6 +7890,7 @@ public SecuritySolution() { } public Azure.ResourceManager.SecurityCenter.Models.SecurityFamilyProvisioningState? ProvisioningState { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.SecurityFamily? SecurityFamily { get { throw null; } set { } } public string Template { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecuritySolution System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecuritySolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7641,6 +7908,7 @@ public SecuritySolutionsReferenceData(Azure.ResourceManager.SecurityCenter.Model public string PublisherDisplayName { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.SecurityFamily SecurityFamily { get { throw null; } set { } } public string Template { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecuritySolutionsReferenceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecuritySolutionsReferenceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7668,6 +7936,7 @@ public SecuritySolutionsReferenceData(Azure.ResourceManager.SecurityCenter.Model public abstract partial class SecuritySubAssessmentAdditionalInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected SecuritySubAssessmentAdditionalInfo() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecuritySubAssessmentAdditionalInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecuritySubAssessmentAdditionalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7679,6 +7948,7 @@ public partial class SecurityTaskProperties : System.ClientModel.Primitives.IJso public SecurityTaskProperties() { } public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityTaskProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityTaskProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7715,6 +7985,7 @@ public SecurityTopologyResource() { } public System.DateTimeOffset? CalculatedOn { get { throw null; } } public Azure.Core.AzureLocation? Location { get { throw null; } } public System.Collections.Generic.IReadOnlyList TopologyResources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityTopologyResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SecurityTopologyResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7785,6 +8056,7 @@ public SensitivityLabel() { } public bool? IsEnabled { get { throw null; } set { } } public int? Order { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.SensitivityLabelRank? Rank { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SensitivityLabel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SensitivityLabel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7805,6 +8077,7 @@ public SensitivitySettingCreateOrUpdateContent(System.Collections.Generic.IEnume public System.Collections.Generic.IList SensitiveInfoTypesIds { get { throw null; } } public System.Guid? SensitivityThresholdLabelId { get { throw null; } set { } } public float? SensitivityThresholdLabelOrder { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SensitivitySettingCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SensitivitySettingCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7818,6 +8091,7 @@ internal SensitivitySettingsProperties() { } public System.Collections.Generic.IReadOnlyList SensitiveInfoTypesIds { get { throw null; } } public System.Guid? SensitivityThresholdLabelId { get { throw null; } } public float? SensitivityThresholdLabelOrder { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SensitivitySettingsProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SensitivitySettingsProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7889,6 +8163,7 @@ public ServerVulnerabilityProperties() { } public string ServerVulnerabilityType { get { throw null; } } public string Threat { get { throw null; } } public System.Collections.Generic.IReadOnlyList VendorReferences { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ServerVulnerabilityProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ServerVulnerabilityProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7900,6 +8175,7 @@ public partial class ServicePrincipalProperties : System.ClientModel.Primitives. public ServicePrincipalProperties() { } public System.Guid? ApplicationId { get { throw null; } set { } } public string Secret { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ServicePrincipalProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ServicePrincipalProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7911,6 +8187,7 @@ public partial class SqlServerVulnerabilityProperties : Azure.ResourceManager.Se public SqlServerVulnerabilityProperties() { } public string Query { get { throw null; } } public string SqlServerVulnerabilityType { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SqlServerVulnerabilityProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SqlServerVulnerabilityProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7922,6 +8199,7 @@ public partial class SqlVulnerabilityAssessmentBaseline : System.ClientModel.Pri public SqlVulnerabilityAssessmentBaseline() { } public System.Collections.Generic.IList> ExpectedResults { get { throw null; } } public System.DateTimeOffset? UpdatedOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentBaseline System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentBaseline System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7933,6 +8211,7 @@ public partial class SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent public SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent() { } public bool? LatestScan { get { throw null; } set { } } public System.Collections.Generic.IList> Results { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7946,6 +8225,7 @@ public SqlVulnerabilityAssessmentRemediation() { } public bool? IsAutomated { get { throw null; } set { } } public string PortalLink { get { throw null; } set { } } public System.Collections.Generic.IList Scripts { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentRemediation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentRemediation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7970,6 +8250,7 @@ public SqlVulnerabilityAssessmentScanProperties() { } public int? TotalPassedRulesCount { get { throw null; } set { } } public int? TotalRulesCount { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanTriggerType? TriggerType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7980,6 +8261,7 @@ public partial class SqlVulnerabilityAssessmentScanResult : Azure.ResourceManage { public SqlVulnerabilityAssessmentScanResult() { } public Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanResultProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7996,6 +8278,7 @@ public SqlVulnerabilityAssessmentScanResultProperties() { } public string RuleId { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.VulnerabilityAssessmentRule RuleMetadata { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanResultRuleStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanResultProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanResultProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8066,6 +8349,7 @@ public SubAssessmentStatus() { } public Azure.ResourceManager.SecurityCenter.Models.SubAssessmentStatusCode? Code { get { throw null; } } public string Description { get { throw null; } } public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentSeverity? Severity { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SubAssessmentStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SubAssessmentStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8096,6 +8380,7 @@ public partial class SuppressionAlertsScopeElement : System.ClientModel.Primitiv public SuppressionAlertsScopeElement() { } public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } } public string Field { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SuppressionAlertsScopeElement System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.SuppressionAlertsScopeElement System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8107,6 +8392,7 @@ public partial class TargetBranchConfiguration : System.ClientModel.Primitives.I public TargetBranchConfiguration() { } public Azure.ResourceManager.SecurityCenter.Models.AnnotateDefaultBranchState? AnnotateDefaultBranch { get { throw null; } set { } } public System.Collections.Generic.IList BranchNames { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.TargetBranchConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.TargetBranchConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8118,6 +8404,7 @@ public partial class ThresholdCustomAlertRule : Azure.ResourceManager.SecurityCe public ThresholdCustomAlertRule(bool isEnabled, int minThreshold, int maxThreshold) : base (default(bool)) { } public int MaxThreshold { get { throw null; } set { } } public int MinThreshold { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ThresholdCustomAlertRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.ThresholdCustomAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8128,6 +8415,7 @@ public partial class TimeWindowCustomAlertRule : Azure.ResourceManager.SecurityC { public TimeWindowCustomAlertRule(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int)) { } public System.TimeSpan TimeWindowSize { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8145,6 +8433,7 @@ internal TopologySingleResource() { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } public string Severity { get { throw null; } } public int? TopologyScore { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.TopologySingleResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.TopologySingleResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8155,6 +8444,7 @@ public partial class TopologySingleResourceChild : System.ClientModel.Primitives { internal TopologySingleResourceChild() { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.TopologySingleResourceChild System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.TopologySingleResourceChild System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8165,6 +8455,7 @@ public partial class TopologySingleResourceParent : System.ClientModel.Primitive { internal TopologySingleResourceParent() { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.TopologySingleResourceParent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.TopologySingleResourceParent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8174,6 +8465,7 @@ internal TopologySingleResourceParent() { } public partial class TwinUpdatesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public TwinUpdatesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.TwinUpdatesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.TwinUpdatesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8183,6 +8475,7 @@ public partial class TwinUpdatesNotInAllowedRange : Azure.ResourceManager.Securi public partial class UnauthorizedOperationsNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public UnauthorizedOperationsNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.UnauthorizedOperationsNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.UnauthorizedOperationsNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8213,6 +8506,7 @@ internal UserDefinedInformationType() { } public string Description { get { throw null; } } public System.Guid? Id { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.UserDefinedInformationType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.UserDefinedInformationType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8224,6 +8518,7 @@ public partial class UserDefinedResourcesProperties : System.ClientModel.Primiti public UserDefinedResourcesProperties(string query, System.Collections.Generic.IEnumerable querySubscriptions) { } public string Query { get { throw null; } set { } } public System.Collections.Generic.IList QuerySubscriptions { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.UserDefinedResourcesProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.UserDefinedResourcesProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8235,6 +8530,7 @@ public partial class UserRecommendation : System.ClientModel.Primitives.IJsonMod public UserRecommendation() { } public Azure.ResourceManager.SecurityCenter.Models.RecommendationAction? RecommendationAction { get { throw null; } set { } } public string Username { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.UserRecommendation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.UserRecommendation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8246,6 +8542,7 @@ public partial class VendorReference : System.ClientModel.Primitives.IJsonModel< internal VendorReference() { } public string Link { get { throw null; } } public string Title { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.VendorReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.VendorReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8259,6 +8556,7 @@ public VmRecommendation() { } public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterVmEnforcementSupportState? EnforcementSupport { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.RecommendationAction? RecommendationAction { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.VmRecommendation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.VmRecommendation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8295,6 +8593,7 @@ public VulnerabilityAssessmentRule() { } public Azure.ResourceManager.SecurityCenter.Models.VulnerabilityAssessmentRuleType? RuleType { get { throw null; } set { } } public Azure.ResourceManager.SecurityCenter.Models.RuleSeverity? Severity { get { throw null; } set { } } public string Title { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.VulnerabilityAssessmentRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.VulnerabilityAssessmentRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8307,6 +8606,7 @@ public VulnerabilityAssessmentRuleQueryCheck() { } public System.Collections.Generic.IList ColumnNames { get { throw null; } } public System.Collections.Generic.IList> ExpectedResult { get { throw null; } } public string Query { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.VulnerabilityAssessmentRuleQueryCheck System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityCenter.Models.VulnerabilityAssessmentRuleQueryCheck System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/assets.json b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/assets.json index 092977481c2f3..df7ad393e7293 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/assets.json +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/securitycenter/Azure.ResourceManager.SecurityCenter", - "Tag": "net/securitycenter/Azure.ResourceManager.SecurityCenter_965b920921" + "Tag": "net/securitycenter/Azure.ResourceManager.SecurityCenter_4103de93a6" } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupData.Serialization.cs index fc05f27b6e5d6..9f13ffc8393af 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupData.Serialization.cs @@ -20,6 +20,15 @@ public partial class AdaptiveApplicationControlGroupData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(AdaptiveApplicationControlGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(EnforcementMode)) @@ -111,22 +100,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AdaptiveApplicationControlGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningData.Serialization.cs index e03827ac17db5..b289083b940f2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningData.Serialization.cs @@ -20,6 +20,15 @@ public partial class AdaptiveNetworkHardeningData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(AdaptiveNetworkHardeningData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(Rules)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AdaptiveNetworkHardeningData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdvancedThreatProtectionSettingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdvancedThreatProtectionSettingData.Serialization.cs index 062f7ae5d37c6..15c8c00ad377f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdvancedThreatProtectionSettingData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdvancedThreatProtectionSettingData.Serialization.cs @@ -19,6 +19,15 @@ public partial class AdvancedThreatProtectionSettingData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(AdvancedThreatProtectionSettingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) @@ -55,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteBooleanValue(IsEnabled.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AdvancedThreatProtectionSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AutoProvisioningSettingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AutoProvisioningSettingData.Serialization.cs index 4011f30a5531d..5f0b82e9033d6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AutoProvisioningSettingData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AutoProvisioningSettingData.Serialization.cs @@ -20,6 +20,15 @@ public partial class AutoProvisioningSettingData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AutoProvisioningSettingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AutoProvision)) @@ -56,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(AutoProvision.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AutoProvisioningSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ComplianceResultData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ComplianceResultData.Serialization.cs index 8d14fbaa95016..2896044ebc557 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ComplianceResultData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ComplianceResultData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ComplianceResultData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ComplianceResultData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceStatus)) @@ -56,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(ResourceStatus.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ComplianceResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationData.Serialization.cs index e0a976c52137f..13e9a32203f06 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class CustomAssessmentAutomationData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(CustomAssessmentAutomationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(CompressedQuery)) @@ -86,22 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStringValue(AssessmentKey); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CustomAssessmentAutomationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentData.Serialization.cs index 9406d7bb600c9..4ab5e3b14e95a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentData.Serialization.cs @@ -19,6 +19,15 @@ public partial class CustomEntityStoreAssignmentData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(CustomEntityStoreAssignmentData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Principal)) @@ -60,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteStringValue(EntityStoreDatabaseLink); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CustomEntityStoreAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingData.Serialization.cs index f453249a6e507..e03bf7adf967d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DefenderForStorageSettingData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(DefenderForStorageSettingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) @@ -100,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteEndObject(); writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DefenderForStorageSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsConfigurationData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsConfigurationData.Serialization.cs index d0cc359a030bf..de25bee3dc1ec 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsConfigurationData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevOpsConfigurationData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DevOpsConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevOpsConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgData.Serialization.cs index 41c88964f8b19..e277935e23868 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevOpsOrgData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(DevOpsOrgData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevOpsOrgData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectData.Serialization.cs index c7648a83276e0..5f15cac5e2237 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevOpsProjectData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(DevOpsProjectData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevOpsProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryData.Serialization.cs index 56efe045a8b3e..0351f6646caf3 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevOpsRepositoryData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DevOpsRepositoryData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DevOpsRepositoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DeviceSecurityGroupData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DeviceSecurityGroupData.Serialization.cs index 71a68c069786f..4680ef0804cf6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DeviceSecurityGroupData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DeviceSecurityGroupData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DeviceSecurityGroupData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DeviceSecurityGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(ThresholdRules)) @@ -91,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DeviceSecurityGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceAssignmentData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceAssignmentData.Serialization.cs index bab1e9a5e2229..93f820fceec72 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceAssignmentData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceAssignmentData.Serialization.cs @@ -20,6 +20,15 @@ public partial class GovernanceAssignmentData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(GovernanceAssignmentData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Owner)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteObjectValue(AdditionalData, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GovernanceAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceRuleData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceRuleData.Serialization.cs index 123fff2f900cc..08296f395f19e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceRuleData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class GovernanceRuleData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(GovernanceRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(TenantId)) @@ -148,22 +137,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(Metadata, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GovernanceRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedAlertData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedAlertData.Serialization.cs index 1097595a76730..7fdd59b118619 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedAlertData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedAlertData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IotSecurityAggregatedAlertData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(IotSecurityAggregatedAlertData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -39,26 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod } writer.WriteEndObject(); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AlertType)) @@ -132,22 +121,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IotSecurityAggregatedAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedRecommendationData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedRecommendationData.Serialization.cs index ba5af8d70aebf..a95659948a537 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedRecommendationData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedRecommendationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IotSecurityAggregatedRecommendationData : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(IotSecurityAggregatedRecommendationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -39,26 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter wr } writer.WriteEndObject(); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RecommendationName)) @@ -112,22 +101,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteStringValue(LogAnalyticsQuery); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IotSecurityAggregatedRecommendationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionAnalyticsModelData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionAnalyticsModelData.Serialization.cs index 7d13326409e9a..d4d1192b90266 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionAnalyticsModelData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionAnalyticsModelData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IotSecuritySolutionAnalyticsModelData : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(IotSecuritySolutionAnalyticsModelData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Metrics)) @@ -101,22 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IotSecuritySolutionAnalyticsModelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionData.Serialization.cs index 9f1efd53cd734..119aac9d88247 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IotSecuritySolutionData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(IotSecuritySolutionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Workspace)) @@ -149,22 +125,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IotSecuritySolutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/JitNetworkAccessPolicyData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/JitNetworkAccessPolicyData.Serialization.cs index d08dac17476ef..84441ae8bfa31 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/JitNetworkAccessPolicyData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/JitNetworkAccessPolicyData.Serialization.cs @@ -20,6 +20,15 @@ public partial class JitNetworkAccessPolicyData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(JitNetworkAccessPolicyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Kind)) { writer.WritePropertyName("kind"u8); @@ -38,26 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("virtualMachines"u8); @@ -83,22 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(ProvisioningState); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } JitNetworkAccessPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadExternalSecuritySolution.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadExternalSecuritySolution.Serialization.cs index c951f236d1edf..bb6b4c80313cf 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadExternalSecuritySolution.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadExternalSecuritySolution.Serialization.cs @@ -19,6 +19,15 @@ public partial class AadExternalSecuritySolution : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,62 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AadExternalSecuritySolution)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (Kind != null) - { - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.Value.ToString()); - } - else - { - writer.WriteNull("kind"); - } - if (options.Format != "W" && Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AadExternalSecuritySolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadSolutionProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadSolutionProperties.Serialization.cs index e387705db0715..9c272ebb1373f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadSolutionProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadSolutionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class AadSolutionProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(AadSolutionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ConnectivityState)) { writer.WritePropertyName("connectivityState"u8); writer.WriteStringValue(ConnectivityState.Value.ToString()); } - if (Optional.IsDefined(DeviceVendor)) - { - writer.WritePropertyName("deviceVendor"u8); - writer.WriteStringValue(DeviceVendor); - } - if (Optional.IsDefined(DeviceType)) - { - writer.WritePropertyName("deviceType"u8); - writer.WriteStringValue(DeviceType); - } - if (Optional.IsDefined(Workspace)) - { - writer.WritePropertyName("workspace"u8); - JsonSerializer.Serialize(writer, Workspace); - } foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -59,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } #endif } - writer.WriteEndObject(); } AadSolutionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActionableRemediation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActionableRemediation.Serialization.cs index d69bb8be1baec..dffb4b9f7c356 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActionableRemediation.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActionableRemediation.Serialization.cs @@ -18,6 +18,15 @@ public partial class ActionableRemediation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ActionableRemediation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(State)) { writer.WritePropertyName("state"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ActionableRemediation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActiveConnectionsNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActiveConnectionsNotInAllowedRange.Serialization.cs index 012fbe749f21c..06dafd9daac74 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActiveConnectionsNotInAllowedRange.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActiveConnectionsNotInAllowedRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class ActiveConnectionsNotInAllowedRange : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ActiveConnectionsNotInAllowedRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("timeWindowSize"u8); - writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ActiveConnectionsNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlGroups.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlGroups.Serialization.cs index 52f72297e89fa..ebbfffbd4b15e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlGroups.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlGroups.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AdaptiveApplicationControlGroups : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(AdaptiveApplicationControlGroups)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } AdaptiveApplicationControlGroups IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssueSummary.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssueSummary.Serialization.cs index c3e33dab01b81..f2461f2050741 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssueSummary.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssueSummary.Serialization.cs @@ -18,6 +18,15 @@ public partial class AdaptiveApplicationControlIssueSummary : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(AdaptiveApplicationControlIssueSummary)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Issue)) { writer.WritePropertyName("issue"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } AdaptiveApplicationControlIssueSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningEnforceContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningEnforceContent.Serialization.cs index 112f0f39851f1..1b6f64d79e014 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningEnforceContent.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningEnforceContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class AdaptiveNetworkHardeningEnforceContent : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(AdaptiveNetworkHardeningEnforceContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("rules"u8); writer.WriteStartArray(); foreach (var item in Rules) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } AdaptiveNetworkHardeningEnforceContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningsList.Serialization.cs index 02e5fd683ab37..6e5db4268f11a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningsList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningsList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AdaptiveNetworkHardeningsList : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(AdaptiveNetworkHardeningsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } AdaptiveNetworkHardeningsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdditionalWorkspacesProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdditionalWorkspacesProperties.Serialization.cs index 94ca8f4978d4e..91cfe9dac267a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdditionalWorkspacesProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdditionalWorkspacesProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class AdditionalWorkspacesProperties : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(AdditionalWorkspacesProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Workspace)) { writer.WritePropertyName("workspace"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } AdditionalWorkspacesProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertList.Serialization.cs index 1d7f069eec4b5..59d70035f9eca 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AlertList : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(AlertList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } AlertList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertsSuppressionRulesList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertsSuppressionRulesList.Serialization.cs index 3ce432709577b..03ec2a6083452 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertsSuppressionRulesList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertsSuppressionRulesList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AlertsSuppressionRulesList : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(AlertsSuppressionRulesList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } AlertsSuppressionRulesList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowedConnectionsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowedConnectionsList.Serialization.cs index b654764cb59be..39e7810104a83 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowedConnectionsList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowedConnectionsList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AllowedConnectionsList : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(AllowedConnectionsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } AllowedConnectionsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowlistCustomAlertRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowlistCustomAlertRule.Serialization.cs index c6f2b66ef5a54..2def7d19ed948 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowlistCustomAlertRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowlistCustomAlertRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class AllowlistCustomAlertRule : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(AllowlistCustomAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("allowlistValues"u8); writer.WriteStartArray(); foreach (var item in AllowlistValues) @@ -33,41 +42,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(item); } writer.WriteEndArray(); - if (options.Format != "W" && Optional.IsDefined(ValueType)) - { - writer.WritePropertyName("valueType"u8); - writer.WriteStringValue(ValueType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AllowlistCustomAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DMessagesNotInAllowedRange.Serialization.cs index e82d78b289216..1f74b7f8cd001 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DMessagesNotInAllowedRange.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DMessagesNotInAllowedRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class AmqpC2DMessagesNotInAllowedRange : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(AmqpC2DMessagesNotInAllowedRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("timeWindowSize"u8); - writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } AmqpC2DMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DRejectedMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DRejectedMessagesNotInAllowedRange.Serialization.cs index 377b5af7934c3..0bf281b0062ae 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DRejectedMessagesNotInAllowedRange.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DRejectedMessagesNotInAllowedRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class AmqpC2DRejectedMessagesNotInAllowedRange : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(AmqpC2DRejectedMessagesNotInAllowedRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("timeWindowSize"u8); - writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } AmqpC2DRejectedMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpD2CMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpD2CMessagesNotInAllowedRange.Serialization.cs index e2d5614f0362c..abd3a1a072706 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpD2CMessagesNotInAllowedRange.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpD2CMessagesNotInAllowedRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class AmqpD2CMessagesNotInAllowedRange : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(AmqpD2CMessagesNotInAllowedRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("timeWindowSize"u8); - writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } AmqpD2CMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApiCollectionList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApiCollectionList.Serialization.cs index 4e93b04cc967d..d9ad22552f06f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApiCollectionList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApiCollectionList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApiCollectionList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ApiCollectionList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ApiCollectionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApplicationsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApplicationsList.Serialization.cs index 7f4fb2deb2615..621f8d74b62ff 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApplicationsList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApplicationsList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationsList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(ApplicationsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } ApplicationsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AscLocationList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AscLocationList.Serialization.cs index 328e1aa244d6c..3cd5202a9d411 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AscLocationList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AscLocationList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AscLocationList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(AscLocationList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } AscLocationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AssessmentLinks.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AssessmentLinks.Serialization.cs index fc0ee88e242c8..caddec5e5fb0d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AssessmentLinks.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AssessmentLinks.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AssessmentLinks : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(AssessmentLinks)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AzurePortalUri)) { writer.WritePropertyName("azurePortalUri"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } AssessmentLinks IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaExternalSecuritySolution.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaExternalSecuritySolution.Serialization.cs index 3fa03b6c1a869..b41529a5cd92a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaExternalSecuritySolution.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaExternalSecuritySolution.Serialization.cs @@ -19,6 +19,15 @@ public partial class AtaExternalSecuritySolution : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,62 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AtaExternalSecuritySolution)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (Kind != null) - { - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.Value.ToString()); - } - else - { - writer.WriteNull("kind"); - } - if (options.Format != "W" && Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AtaExternalSecuritySolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaSolutionProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaSolutionProperties.Serialization.cs index 2df9ead561e2e..00733309e529f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaSolutionProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaSolutionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class AtaSolutionProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(AtaSolutionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(LastEventReceived)) { writer.WritePropertyName("lastEventReceived"u8); writer.WriteStringValue(LastEventReceived); } - if (Optional.IsDefined(DeviceVendor)) - { - writer.WritePropertyName("deviceVendor"u8); - writer.WriteStringValue(DeviceVendor); - } - if (Optional.IsDefined(DeviceType)) - { - writer.WritePropertyName("deviceType"u8); - writer.WriteStringValue(DeviceType); - } - if (Optional.IsDefined(Workspace)) - { - writer.WritePropertyName("workspace"u8); - JsonSerializer.Serialize(writer, Workspace); - } foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -59,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } #endif } - writer.WriteEndObject(); } AtaSolutionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AuthenticationDetailsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AuthenticationDetailsProperties.Serialization.cs index 9746b552d2151..20732dff9f484 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AuthenticationDetailsProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AuthenticationDetailsProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class AuthenticationDetailsProperties : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(AuthenticationDetailsProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AuthenticationProvisioningState)) { writer.WritePropertyName("authenticationProvisioningState"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } AuthenticationDetailsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutoProvisioningSettingList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutoProvisioningSettingList.Serialization.cs index 583588632c083..5d8e8aca48651 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutoProvisioningSettingList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutoProvisioningSettingList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AutoProvisioningSettingList : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AutoProvisioningSettingList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } AutoProvisioningSettingList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutomationList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutomationList.Serialization.cs index 36b0ea1684203..9421e3bcb4192 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutomationList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutomationList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AutomationList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(AutomationList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } AutomationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsAssumeRoleAuthenticationDetailsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsAssumeRoleAuthenticationDetailsProperties.Serialization.cs index 7756d18805ba5..521263d6d3f28 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsAssumeRoleAuthenticationDetailsProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsAssumeRoleAuthenticationDetailsProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class AwsAssumeRoleAuthenticationDetailsProperties : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(AwsAssumeRoleAuthenticationDetailsProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(AccountId)) { writer.WritePropertyName("accountId"u8); @@ -35,39 +44,6 @@ void IJsonModel.Write(Utf8JsonWrit writer.WriteStringValue(AwsAssumeRoleArn); writer.WritePropertyName("awsExternalId"u8); writer.WriteStringValue(AwsExternalId); - if (options.Format != "W" && Optional.IsDefined(AuthenticationProvisioningState)) - { - writer.WritePropertyName("authenticationProvisioningState"u8); - writer.WriteStringValue(AuthenticationProvisioningState.Value.ToString()); - } - if (options.Format != "W" && Optional.IsCollectionDefined(GrantedPermissions)) - { - writer.WritePropertyName("grantedPermissions"u8); - writer.WriteStartArray(); - foreach (var item in GrantedPermissions) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AwsAssumeRoleAuthenticationDetailsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsCredsAuthenticationDetailsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsCredsAuthenticationDetailsProperties.Serialization.cs index 2573b9e58a0e8..edb706938d8f2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsCredsAuthenticationDetailsProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsCredsAuthenticationDetailsProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class AwsCredsAuthenticationDetailsProperties : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(AwsCredsAuthenticationDetailsProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(AccountId)) { writer.WritePropertyName("accountId"u8); @@ -35,39 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteStringValue(AwsAccessKeyId); writer.WritePropertyName("awsSecretAccessKey"u8); writer.WriteStringValue(AwsSecretAccessKey); - if (options.Format != "W" && Optional.IsDefined(AuthenticationProvisioningState)) - { - writer.WritePropertyName("authenticationProvisioningState"u8); - writer.WriteStringValue(AuthenticationProvisioningState.Value.ToString()); - } - if (options.Format != "W" && Optional.IsCollectionDefined(GrantedPermissions)) - { - writer.WritePropertyName("grantedPermissions"u8); - writer.WriteStartArray(); - foreach (var item in GrantedPermissions) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AwsCredsAuthenticationDetailsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsDefenderForServersInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsDefenderForServersInfo.Serialization.cs index 71304e9d27d8b..54178cdf680be 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsDefenderForServersInfo.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsDefenderForServersInfo.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AwsDefenderForServersInfo : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(AwsDefenderForServersInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CloudRoleArn)) { writer.WritePropertyName("cloudRoleArn"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } AwsDefenderForServersInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsEnvironment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsEnvironment.Serialization.cs index 201b20c2146e3..5c6fc89982a99 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsEnvironment.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsEnvironment.Serialization.cs @@ -18,6 +18,15 @@ public partial class AwsEnvironment : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(AwsEnvironment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(OrganizationalData)) { writer.WritePropertyName("organizationalData"u8); @@ -51,24 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WritePropertyName("scanInterval"u8); writer.WriteNumberValue(ScanInterval.Value); } - writer.WritePropertyName("environmentType"u8); - writer.WriteStringValue(EnvironmentType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AwsEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsInformationProtection.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsInformationProtection.Serialization.cs index fee70261ed913..a452288a31035 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsInformationProtection.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsInformationProtection.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AwsInformationProtection : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(AwsInformationProtection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CloudRoleArn)) { writer.WritePropertyName("cloudRoleArn"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } AwsInformationProtection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMaster.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMaster.Serialization.cs index 5d7e4971a3bff..2f978c94e1882 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMaster.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMaster.Serialization.cs @@ -18,6 +18,15 @@ public partial class AwsOrganizationalDataMaster : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AwsOrganizationalDataMaster)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(StacksetName)) { writer.WritePropertyName("stacksetName"u8); @@ -41,24 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR } writer.WriteEndArray(); } - writer.WritePropertyName("organizationMembershipType"u8); - writer.WriteStringValue(OrganizationMembershipType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AwsOrganizationalDataMaster IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMember.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMember.Serialization.cs index ad128b567fc6b..728516285c4ac 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMember.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMember.Serialization.cs @@ -18,6 +18,15 @@ public partial class AwsOrganizationalDataMember : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AwsOrganizationalDataMember)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ParentHierarchyId)) { writer.WritePropertyName("parentHierarchyId"u8); writer.WriteStringValue(ParentHierarchyId); } - writer.WritePropertyName("organizationMembershipType"u8); - writer.WriteStringValue(OrganizationMembershipType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AwsOrganizationalDataMember IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalInfo.Serialization.cs index 96be47d5e7770..1ba1478e00e0a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalInfo.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class AwsOrganizationalInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(AwsOrganizationalInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("organizationMembershipType"u8); writer.WriteStringValue(OrganizationMembershipType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } AwsOrganizationalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsOrgListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsOrgListResponse.Serialization.cs index da7ddcdea738c..686bdd95b2c08 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsOrgListResponse.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsOrgListResponse.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AzureDevOpsOrgListResponse : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(AzureDevOpsOrgListResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } AzureDevOpsOrgListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsProjectListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsProjectListResponse.Serialization.cs index 2c308a3ca67a5..5074f97f409f6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsProjectListResponse.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsProjectListResponse.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AzureDevOpsProjectListResponse : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(AzureDevOpsProjectListResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } AzureDevOpsProjectListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsRepositoryListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsRepositoryListResponse.Serialization.cs index bb08e605f3e0a..82b4b8214150e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsRepositoryListResponse.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsRepositoryListResponse.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AzureDevOpsRepositoryListResponse : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(AzureDevOpsRepositoryListResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } AzureDevOpsRepositoryListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsScopeEnvironment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsScopeEnvironment.Serialization.cs index bca6778523e87..fbc2f578aecdc 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsScopeEnvironment.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsScopeEnvironment.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureDevOpsScopeEnvironment : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AzureDevOpsScopeEnvironment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("environmentType"u8); - writer.WriteStringValue(EnvironmentType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } AzureDevOpsScopeEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceDetails.Serialization.cs index 743495fde6481..e24f7ea9cc6d5 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceDetails.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureResourceDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(AzureResourceDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); } - writer.WritePropertyName("source"u8); - writer.WriteStringValue(Source.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AzureResourceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceIdentifier.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceIdentifier.Serialization.cs index 1e3be0ddf5e2e..dcee8742799ab 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceIdentifier.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceIdentifier.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureResourceIdentifier : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(AzureResourceIdentifier)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(AzureResourceId)) { writer.WritePropertyName("azureResourceId"u8); writer.WriteStringValue(AzureResourceId); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceIdentifierType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AzureResourceIdentifier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureServersSetting.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureServersSetting.Serialization.cs index 2469bf6739e49..2c7015608b505 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureServersSetting.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureServersSetting.Serialization.cs @@ -19,6 +19,15 @@ public partial class AzureServersSetting : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,29 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AzureServersSetting)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(SelectedProvider)) @@ -57,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(SelectedProvider.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AzureServersSetting IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BaselineAdjustedResult.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BaselineAdjustedResult.Serialization.cs index dbe0de18d0e58..7fca579dd5bcb 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BaselineAdjustedResult.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BaselineAdjustedResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class BaselineAdjustedResult : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(BaselineAdjustedResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Baseline)) { writer.WritePropertyName("baseline"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } BaselineAdjustedResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BenchmarkReference.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BenchmarkReference.Serialization.cs index 2373e5d996b94..2532549f4e6d8 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BenchmarkReference.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BenchmarkReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class BenchmarkReference : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(BenchmarkReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Benchmark)) { writer.WritePropertyName("benchmark"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } BenchmarkReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BuiltInInfoType.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BuiltInInfoType.Serialization.cs index 164314979111f..443d22213fa15 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BuiltInInfoType.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BuiltInInfoType.Serialization.cs @@ -18,6 +18,15 @@ public partial class BuiltInInfoType : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(BuiltInInfoType)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } BuiltInInfoType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CategoryConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CategoryConfiguration.Serialization.cs index 4a2c24f49f1d0..37afa68eefb0b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CategoryConfiguration.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CategoryConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class CategoryConfiguration : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(CategoryConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MinimumSeverityLevel)) { writer.WritePropertyName("minimumSeverityLevel"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } CategoryConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefExternalSecuritySolution.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefExternalSecuritySolution.Serialization.cs index 303375c040556..1a84e1f04bda7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefExternalSecuritySolution.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefExternalSecuritySolution.Serialization.cs @@ -19,6 +19,15 @@ public partial class CefExternalSecuritySolution : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,62 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(CefExternalSecuritySolution)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (Kind != null) - { - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.Value.ToString()); - } - else - { - writer.WriteNull("kind"); - } - if (options.Format != "W" && Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CefExternalSecuritySolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefSolutionProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefSolutionProperties.Serialization.cs index 3bec33451b027..b8ae5f5c0e146 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefSolutionProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefSolutionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class CefSolutionProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(CefSolutionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Hostname)) { writer.WritePropertyName("hostname"u8); @@ -42,21 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WritePropertyName("lastEventReceived"u8); writer.WriteStringValue(LastEventReceived); } - if (Optional.IsDefined(DeviceVendor)) - { - writer.WritePropertyName("deviceVendor"u8); - writer.WriteStringValue(DeviceVendor); - } - if (Optional.IsDefined(DeviceType)) - { - writer.WritePropertyName("deviceType"u8); - writer.WriteStringValue(DeviceType); - } - if (Optional.IsDefined(Workspace)) - { - writer.WritePropertyName("workspace"u8); - JsonSerializer.Serialize(writer, Workspace); - } foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -69,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } #endif } - writer.WriteEndObject(); } CefSolutionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceList.Serialization.cs index f29a03c10cbc7..7cd144d287ca4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ComplianceList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(ComplianceList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } ComplianceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceResultList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceResultList.Serialization.cs index 07d9fe24f1146..c532e0adb338d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceResultList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceResultList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ComplianceResultList : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ComplianceResultList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ComplianceResultList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceSegment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceSegment.Serialization.cs index 36dc4ea701d2e..d18c045b81c75 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceSegment.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceSegment.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComplianceSegment : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ComplianceSegment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(SegmentType)) { writer.WritePropertyName("segmentType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ComplianceSegment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectableResourceInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectableResourceInfo.Serialization.cs index d94f541c1085e..2065498088c1d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectableResourceInfo.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectableResourceInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectableResourceInfo : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ConnectableResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ConnectableResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectedResourceInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectedResourceInfo.Serialization.cs index b649a8b39d18d..ebfe2173cecd8 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectedResourceInfo.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectedResourceInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectedResourceInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ConnectedResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ConnectedResourceId)) { writer.WritePropertyName("connectedResourceId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ConnectedResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionFromIPNotAllowed.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionFromIPNotAllowed.Serialization.cs index d036f53ab95f4..fae0d0db0b63e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionFromIPNotAllowed.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionFromIPNotAllowed.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionFromIPNotAllowed : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,49 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ConnectionFromIPNotAllowed)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("allowlistValues"u8); - writer.WriteStartArray(); - foreach (var item in AllowlistValues) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - if (options.Format != "W" && Optional.IsDefined(ValueType)) - { - writer.WritePropertyName("valueType"u8); - writer.WriteStringValue(ValueType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ConnectionFromIPNotAllowed IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionToIPNotAllowed.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionToIPNotAllowed.Serialization.cs index 588a1e2f57bd1..85eaf3717430d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionToIPNotAllowed.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionToIPNotAllowed.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionToIPNotAllowed : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,49 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ConnectionToIPNotAllowed)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("allowlistValues"u8); - writer.WriteStartArray(); - foreach (var item in AllowlistValues) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - if (options.Format != "W" && Optional.IsDefined(ValueType)) - { - writer.WritePropertyName("valueType"u8); - writer.WriteStringValue(ValueType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ConnectionToIPNotAllowed IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectorSettingList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectorSettingList.Serialization.cs index 83afd5ebf70c1..d7179d6652ae6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectorSettingList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectorSettingList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ConnectorSettingList : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ConnectorSettingList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ConnectorSettingList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ContainerRegistryVulnerabilityProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ContainerRegistryVulnerabilityProperties.Serialization.cs index 84ce9ef7dc22a..41a687ca6b9c3 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ContainerRegistryVulnerabilityProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ContainerRegistryVulnerabilityProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerRegistryVulnerabilityProperties : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ContainerRegistryVulnerabilityProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ContainerRegistryVulnerabilityPropertiesType)) { writer.WritePropertyName("type"u8); @@ -82,24 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WritePropertyName("imageDigest"u8); writer.WriteStringValue(ImageDigest); } - writer.WritePropertyName("assessedResourceType"u8); - writer.WriteStringValue(AssessedResourceType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerRegistryVulnerabilityProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOffering.Serialization.cs index 8ee6eab2b891c..ee823bc68a24b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOffering.Serialization.cs @@ -18,6 +18,15 @@ public partial class CspmMonitorAwsOffering : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(CspmMonitorAwsOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(NativeCloudConnection)) { writer.WritePropertyName("nativeCloudConnection"u8); writer.WriteObjectValue(NativeCloudConnection, options); } - writer.WritePropertyName("offeringType"u8); - writer.WriteStringValue(OfferingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CspmMonitorAwsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOfferingNativeCloudConnection.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOfferingNativeCloudConnection.Serialization.cs index 54be1868848e9..a3ad2275efedd 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOfferingNativeCloudConnection.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOfferingNativeCloudConnection.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CspmMonitorAwsOfferingNativeCloudConnection : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(CspmMonitorAwsOfferingNativeCloudConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CloudRoleArn)) { writer.WritePropertyName("cloudRoleArn"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } CspmMonitorAwsOfferingNativeCloudConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAzureDevOpsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAzureDevOpsOffering.Serialization.cs index 6a1bc812831df..dc9fdd72a287d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAzureDevOpsOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAzureDevOpsOffering.Serialization.cs @@ -18,6 +18,15 @@ public partial class CspmMonitorAzureDevOpsOffering : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(CspmMonitorAzureDevOpsOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("offeringType"u8); - writer.WriteStringValue(OfferingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } CspmMonitorAzureDevOpsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOffering.Serialization.cs index 87f3da4b205e6..2cab9fc4ffb4f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOffering.Serialization.cs @@ -18,6 +18,15 @@ public partial class CspmMonitorGcpOffering : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(CspmMonitorGcpOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(NativeCloudConnection)) { writer.WritePropertyName("nativeCloudConnection"u8); writer.WriteObjectValue(NativeCloudConnection, options); } - writer.WritePropertyName("offeringType"u8); - writer.WriteStringValue(OfferingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CspmMonitorGcpOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOfferingNativeCloudConnection.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOfferingNativeCloudConnection.Serialization.cs index 689911ebb5859..83ff5fdecdd31 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOfferingNativeCloudConnection.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOfferingNativeCloudConnection.Serialization.cs @@ -18,6 +18,15 @@ public partial class CspmMonitorGcpOfferingNativeCloudConnection : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(CspmMonitorGcpOfferingNativeCloudConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(WorkloadIdentityProviderId)) { writer.WritePropertyName("workloadIdentityProviderId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } CspmMonitorGcpOfferingNativeCloudConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGitLabOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGitLabOffering.Serialization.cs index 2461bf1f05942..6b2c4144b632e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGitLabOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGitLabOffering.Serialization.cs @@ -18,6 +18,15 @@ public partial class CspmMonitorGitLabOffering : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(CspmMonitorGitLabOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("offeringType"u8); - writer.WriteStringValue(OfferingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } CspmMonitorGitLabOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGithubOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGithubOffering.Serialization.cs index 74c51d815d81a..a4a3be8ee4ddb 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGithubOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGithubOffering.Serialization.cs @@ -18,6 +18,15 @@ public partial class CspmMonitorGithubOffering : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(CspmMonitorGithubOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("offeringType"u8); - writer.WriteStringValue(OfferingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } CspmMonitorGithubOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAlertRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAlertRule.Serialization.cs index a3f56e5a82b98..d0b84436c5ab4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAlertRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAlertRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class CustomAlertRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(CustomAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayName)) { writer.WritePropertyName("displayName"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } CustomAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationCreateOrUpdateContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationCreateOrUpdateContent.Serialization.cs index fbe89072d8254..3d55c4ae95f1f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationCreateOrUpdateContent.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationCreateOrUpdateContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class CustomAssessmentAutomationCreateOrUpdateContent : IUtf8Json void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(CustomAssessmentAutomationCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(CompressedQuery)) @@ -80,22 +69,6 @@ void IJsonModel.Write(Utf8JsonW writer.WriteStringValue(RemediationDescription); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CustomAssessmentAutomationCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationsListResult.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationsListResult.Serialization.cs index 1ae96ec5a3c6a..6d5669a6eb90d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationsListResult.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationsListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CustomAssessmentAutomationsListResult : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(CustomAssessmentAutomationsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } CustomAssessmentAutomationsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentCreateOrUpdateContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentCreateOrUpdateContent.Serialization.cs index 942df10fb5c8b..0ed54cfb0e2bd 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentCreateOrUpdateContent.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentCreateOrUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class CustomEntityStoreAssignmentCreateOrUpdateContent : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Json throw new FormatException($"The model {nameof(CustomEntityStoreAssignmentCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Principal)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8Json #endif } } - writer.WriteEndObject(); } CustomEntityStoreAssignmentCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentsListResult.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentsListResult.Serialization.cs index f5cfc524a83b8..99de275ae330c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentsListResult.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentsListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CustomEntityStoreAssignmentsListResult : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(CustomEntityStoreAssignmentsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } CustomEntityStoreAssignmentsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DataExportSettings.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DataExportSettings.Serialization.cs index 03e07bc2ca14d..4153d60fcf4ad 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DataExportSettings.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DataExportSettings.Serialization.cs @@ -19,6 +19,15 @@ public partial class DataExportSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,29 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DataExportSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) @@ -57,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteBooleanValue(IsEnabled.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DataExportSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOffering.Serialization.cs index 82c02e8a83751..72ea4d58efbf9 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOffering.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOffering : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DefenderCspmAwsOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(VmScanners)) { writer.WritePropertyName("vmScanners"u8); @@ -56,29 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WritePropertyName("mdcContainersAgentlessDiscoveryK8s"u8); writer.WriteObjectValue(MdcContainersAgentlessDiscoveryK8S, options); } - writer.WritePropertyName("offeringType"u8); - writer.WriteStringValue(OfferingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DefenderCspmAwsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiem.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiem.Serialization.cs index 51d07ac1ca27c..92484cc5460e6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiem.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiem.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingCiem : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingCiem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CiemDiscovery)) { writer.WritePropertyName("ciemDiscovery"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } DefenderCspmAwsOfferingCiem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemDiscovery.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemDiscovery.Serialization.cs index dc5a8b732770a..2f849fe175790 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemDiscovery.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemDiscovery.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DefenderCspmAwsOfferingCiemDiscovery : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingCiemDiscovery)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CloudRoleArn)) { writer.WritePropertyName("cloudRoleArn"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } DefenderCspmAwsOfferingCiemDiscovery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemOidc.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemOidc.Serialization.cs index ae242858dae76..150ae554326fc 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemOidc.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemOidc.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingCiemOidc : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingCiemOidc)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CloudRoleArn)) { writer.WritePropertyName("cloudRoleArn"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } DefenderCspmAwsOfferingCiemOidc IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDataSensitivityDiscovery.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDataSensitivityDiscovery.Serialization.cs index 11465e599327c..a8da431968121 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDataSensitivityDiscovery.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDataSensitivityDiscovery.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingDataSensitivityDiscovery : IUtf8Json void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingDataSensitivityDiscovery)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonW #endif } } - writer.WriteEndObject(); } DefenderCspmAwsOfferingDataSensitivityDiscovery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDatabasesDspm.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDatabasesDspm.Serialization.cs index 6e419616a37f4..bffc2a5b1a7c6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDatabasesDspm.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDatabasesDspm.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingDatabasesDspm : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingDatabasesDspm)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } DefenderCspmAwsOfferingDatabasesDspm IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs index 0a367e3fb1809..8ed5d43b48ba2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S : void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write #endif } } - writer.WriteEndObject(); } DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersImageAssessment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersImageAssessment.Serialization.cs index 8140109bd893d..0b48f6082d44d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersImageAssessment.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersImageAssessment.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingMdcContainersImageAssessment : IUtf8 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8J throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingMdcContainersImageAssessment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8J #endif } } - writer.WriteEndObject(); } DefenderCspmAwsOfferingMdcContainersImageAssessment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScanners.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScanners.Serialization.cs index c0197a04b9e01..f27a0b9b194db 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScanners.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScanners.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingVmScanners : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingVmScanners)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Enabled)) { writer.WritePropertyName("enabled"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DefenderCspmAwsOfferingVmScanners IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScannersConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScannersConfiguration.Serialization.cs index 52bc6ebdffab5..17c200a3188be 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScannersConfiguration.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScannersConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingVmScannersConfiguration : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingVmScannersConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CloudRoleArn)) { writer.WritePropertyName("cloudRoleArn"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } DefenderCspmAwsOfferingVmScannersConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOffering.Serialization.cs index c0a1fa601ebbf..620fbccb9a4fd 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOffering.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderCspmGcpOffering : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DefenderCspmGcpOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(CiemDiscovery)) { writer.WritePropertyName("ciemDiscovery"u8); @@ -51,29 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WritePropertyName("mdcContainersAgentlessDiscoveryK8s"u8); writer.WriteObjectValue(MdcContainersAgentlessDiscoveryK8S, options); } - writer.WritePropertyName("offeringType"u8); - writer.WriteStringValue(OfferingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DefenderCspmGcpOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingCiemDiscovery.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingCiemDiscovery.Serialization.cs index a039e8ba137a7..395345a73bc20 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingCiemDiscovery.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingCiemDiscovery.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderCspmGcpOfferingCiemDiscovery : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(DefenderCspmGcpOfferingCiemDiscovery)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(WorkloadIdentityProviderId)) { writer.WritePropertyName("workloadIdentityProviderId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } DefenderCspmGcpOfferingCiemDiscovery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingDataSensitivityDiscovery.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingDataSensitivityDiscovery.Serialization.cs index 6cccae791e01f..7625c89d0560c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingDataSensitivityDiscovery.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingDataSensitivityDiscovery.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderCspmGcpOfferingDataSensitivityDiscovery : IUtf8Json void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(DefenderCspmGcpOfferingDataSensitivityDiscovery)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonW #endif } } - writer.WriteEndObject(); } DefenderCspmGcpOfferingDataSensitivityDiscovery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs index a319ea15fc3bb..972f8c4d51284 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S : void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write throw new FormatException($"The model {nameof(DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write #endif } } - writer.WriteEndObject(); } DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersImageAssessment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersImageAssessment.Serialization.cs index c917433775d3d..e19074831377b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersImageAssessment.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersImageAssessment.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderCspmGcpOfferingMdcContainersImageAssessment : IUtf8 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8J throw new FormatException($"The model {nameof(DefenderCspmGcpOfferingMdcContainersImageAssessment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8J #endif } } - writer.WriteEndObject(); } DefenderCspmGcpOfferingMdcContainersImageAssessment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScanners.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScanners.Serialization.cs index cd3c899c18f31..3ae3bfc56cc3d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScanners.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScanners.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderCspmGcpOfferingVmScanners : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(DefenderCspmGcpOfferingVmScanners)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DefenderCspmGcpOfferingVmScanners IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScannersConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScannersConfiguration.Serialization.cs index cd062ee2afa3a..0dd2bb1ebfb8e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScannersConfiguration.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScannersConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderCspmGcpOfferingVmScannersConfiguration : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(DefenderCspmGcpOfferingVmScannersConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ScanningMode)) { writer.WritePropertyName("scanningMode"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } DefenderCspmGcpOfferingVmScannersConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs index 31cc453cecc12..0d51e45b28853 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfigurat void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel. throw new FormatException($"The model {nameof(DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Proxy)) { writer.WritePropertyName("proxy"u8); @@ -51,7 +59,6 @@ void IJsonModel. #endif } } - writer.WriteEndObject(); } DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingDatabasesDspm.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingDatabasesDspm.Serialization.cs index f76377c932517..c5b9cb2d4406e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingDatabasesDspm.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingDatabasesDspm.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderFoDatabasesAwsOfferingDatabasesDspm : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(DefenderFoDatabasesAwsOfferingDatabasesDspm)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } DefenderFoDatabasesAwsOfferingDatabasesDspm IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOffering.Serialization.cs index 23ece96212b7c..a7aa49775b56a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOffering.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForContainersAwsOffering : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(DefenderForContainersAwsOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(KubernetesService)) { writer.WritePropertyName("kubernetesService"u8); @@ -86,29 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WritePropertyName("mdcContainersAgentlessDiscoveryK8s"u8); writer.WriteObjectValue(MdcContainersAgentlessDiscoveryK8S, options); } - writer.WritePropertyName("offeringType"u8); - writer.WriteStringValue(OfferingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DefenderForContainersAwsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingCloudWatchToKinesis.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingCloudWatchToKinesis.Serialization.cs index 93ed7c19495d3..cb53907b2489f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingCloudWatchToKinesis.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingCloudWatchToKinesis.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DefenderForContainersAwsOfferingCloudWatchToKinesis : IUt void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8J throw new FormatException($"The model {nameof(DefenderForContainersAwsOfferingCloudWatchToKinesis)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CloudRoleArn)) { writer.WritePropertyName("cloudRoleArn"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8J #endif } } - writer.WriteEndObject(); } DefenderForContainersAwsOfferingCloudWatchToKinesis IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessment.Serialization.cs index 55b36ef26d547..a7ff598cc6657 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessment.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessment.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DefenderForContainersAwsOfferingContainerVulnerabilityAss void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask.Serialization.cs index cc8b2d78790c6..b6c6bd7d09cbe 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DefenderForContainersAwsOfferingContainerVulnerabilityAss void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKinesisToS3.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKinesisToS3.Serialization.cs index 7dc8f83062768..a65c6c2da469d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKinesisToS3.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKinesisToS3.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DefenderForContainersAwsOfferingKinesisToS3 : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(DefenderForContainersAwsOfferingKinesisToS3)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CloudRoleArn)) { writer.WritePropertyName("cloudRoleArn"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } DefenderForContainersAwsOfferingKinesisToS3 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesScubaReader.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesScubaReader.Serialization.cs index 60ee898ae91eb..867eedd08d451 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesScubaReader.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesScubaReader.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DefenderForContainersAwsOfferingKubernetesScubaReader : I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf throw new FormatException($"The model {nameof(DefenderForContainersAwsOfferingKubernetesScubaReader)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CloudRoleArn)) { writer.WritePropertyName("cloudRoleArn"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf #endif } } - writer.WriteEndObject(); } DefenderForContainersAwsOfferingKubernetesScubaReader IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesService.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesService.Serialization.cs index 7207ab754c932..71de5d3d6257c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesService.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesService.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DefenderForContainersAwsOfferingKubernetesService : IUtf8 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Jso throw new FormatException($"The model {nameof(DefenderForContainersAwsOfferingKubernetesService)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CloudRoleArn)) { writer.WritePropertyName("cloudRoleArn"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8Jso #endif } } - writer.WriteEndObject(); } DefenderForContainersAwsOfferingKubernetesService IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs index 355945c315e36..d61eee622b50b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForContainersAwsOfferingMdcContainersAgentlessDisco void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersImageAssessment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersImageAssessment.Serialization.cs index bec2c88735a6a..8de5cc1a4a086 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersImageAssessment.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersImageAssessment.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForContainersAwsOfferingMdcContainersImageAssessmen void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Wr throw new FormatException($"The model {nameof(DefenderForContainersAwsOfferingMdcContainersImageAssessment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -51,7 +59,6 @@ void IJsonModel.Wr #endif } } - writer.WriteEndObject(); } DefenderForContainersAwsOfferingMdcContainersImageAssessment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOffering.Serialization.cs index a41640ca9ade9..3a047d2e64474 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOffering.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForContainersGcpOffering : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(DefenderForContainersGcpOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(NativeCloudConnection)) { writer.WritePropertyName("nativeCloudConnection"u8); @@ -61,29 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WritePropertyName("mdcContainersAgentlessDiscoveryK8s"u8); writer.WriteObjectValue(MdcContainersAgentlessDiscoveryK8S, options); } - writer.WritePropertyName("offeringType"u8); - writer.WriteStringValue(OfferingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DefenderForContainersGcpOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection.Serialization.cs index ff888b68ea376..c821fb08c5486 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForContainersGcpOfferingDataPipelineNativeCloudConn void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs index 506d90fafce1c..dca80f139b718 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForContainersGcpOfferingMdcContainersAgentlessDisco void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersImageAssessment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersImageAssessment.Serialization.cs index ef5eac03c46cc..f285bb4374ae4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersImageAssessment.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersImageAssessment.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForContainersGcpOfferingMdcContainersImageAssessmen void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Wr throw new FormatException($"The model {nameof(DefenderForContainersGcpOfferingMdcContainersImageAssessment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -56,7 +64,6 @@ void IJsonModel.Wr #endif } } - writer.WriteEndObject(); } DefenderForContainersGcpOfferingMdcContainersImageAssessment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingNativeCloudConnection.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingNativeCloudConnection.Serialization.cs index 5101bb9f35166..696fde11cf841 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingNativeCloudConnection.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingNativeCloudConnection.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForContainersGcpOfferingNativeCloudConnection : IUt void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf throw new FormatException($"The model {nameof(DefenderForContainersGcpOfferingNativeCloudConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ServiceAccountEmailAddress)) { writer.WritePropertyName("serviceAccountEmailAddress"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf #endif } } - writer.WriteEndObject(); } DefenderForContainersGcpOfferingNativeCloudConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOffering.Serialization.cs index 0536a01e9dd9b..2acf79d375608 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOffering.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForDatabasesAwsOffering : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(DefenderForDatabasesAwsOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ArcAutoProvisioning)) { writer.WritePropertyName("arcAutoProvisioning"u8); @@ -41,29 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WritePropertyName("databasesDspm"u8); writer.WriteObjectValue(DatabasesDspm, options); } - writer.WritePropertyName("offeringType"u8); - writer.WriteStringValue(OfferingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DefenderForDatabasesAwsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingArcAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingArcAutoProvisioning.Serialization.cs index fb3cc7d9f5069..67545a37ef603 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingArcAutoProvisioning.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingArcAutoProvisioning.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForDatabasesAwsOfferingArcAutoProvisioning : IUtf8J void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Js throw new FormatException($"The model {nameof(DefenderForDatabasesAwsOfferingArcAutoProvisioning)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8Js #endif } } - writer.WriteEndObject(); } DefenderForDatabasesAwsOfferingArcAutoProvisioning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingRds.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingRds.Serialization.cs index 2d024e191a20e..e7c850d65034e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingRds.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingRds.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForDatabasesAwsOfferingRds : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(DefenderForDatabasesAwsOfferingRds)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DefenderForDatabasesAwsOfferingRds IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOffering.Serialization.cs index cdea16fdbbc11..9e2d29460d357 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOffering.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForDatabasesGcpOffering : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(DefenderForDatabasesGcpOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ArcAutoProvisioning)) { writer.WritePropertyName("arcAutoProvisioning"u8); @@ -36,29 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WritePropertyName("defenderForDatabasesArcAutoProvisioning"u8); writer.WriteObjectValue(DefenderForDatabasesArcAutoProvisioning, options); } - writer.WritePropertyName("offeringType"u8); - writer.WriteStringValue(OfferingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DefenderForDatabasesGcpOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioning.Serialization.cs index 997dd13c124e5..8dd8f036f7045 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioning.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioning.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForDatabasesGcpOfferingArcAutoProvisioning : IUtf8J void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Js throw new FormatException($"The model {nameof(DefenderForDatabasesGcpOfferingArcAutoProvisioning)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8Js #endif } } - writer.WriteEndObject(); } DefenderForDatabasesGcpOfferingArcAutoProvisioning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs index fbf37309010e5..f8a620d6d782d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForDatabasesGcpOfferingArcAutoProvisioningConfigura void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel throw new FormatException($"The model {nameof(DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Proxy)) { writer.WritePropertyName("proxy"u8); @@ -51,7 +59,6 @@ void IJsonModel #endif } } - writer.WriteEndObject(); } DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsAzureDevOpsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsAzureDevOpsOffering.Serialization.cs index 7ba7d4354811d..bdd13304193af 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsAzureDevOpsOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsAzureDevOpsOffering.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForDevOpsAzureDevOpsOffering : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(DefenderForDevOpsAzureDevOpsOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("offeringType"u8); - writer.WriteStringValue(OfferingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DefenderForDevOpsAzureDevOpsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGitLabOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGitLabOffering.Serialization.cs index d212de7148fef..16cd740f14561 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGitLabOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGitLabOffering.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForDevOpsGitLabOffering : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(DefenderForDevOpsGitLabOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("offeringType"u8); - writer.WriteStringValue(OfferingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DefenderForDevOpsGitLabOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGithubOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGithubOffering.Serialization.cs index fd80eebf183d2..232320af1cc53 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGithubOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGithubOffering.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForDevOpsGithubOffering : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(DefenderForDevOpsGithubOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("offeringType"u8); - writer.WriteStringValue(OfferingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DefenderForDevOpsGithubOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOffering.Serialization.cs index 3e6fd54064eb9..460819a681881 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOffering.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForServersAwsOffering : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(DefenderForServersAwsOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(DefenderForServers)) { writer.WritePropertyName("defenderForServers"u8); @@ -56,29 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WritePropertyName("vmScanners"u8); writer.WriteObjectValue(VmScanners, options); } - writer.WritePropertyName("offeringType"u8); - writer.WriteStringValue(OfferingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DefenderForServersAwsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioning.Serialization.cs index f188625ace5ec..2787085ff6ea6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioning.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioning.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForServersAwsOfferingArcAutoProvisioning : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Json throw new FormatException($"The model {nameof(DefenderForServersAwsOfferingArcAutoProvisioning)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8Json #endif } } - writer.WriteEndObject(); } DefenderForServersAwsOfferingArcAutoProvisioning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs index 54a659427b27f..6a32ce4db9588 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForServersAwsOfferingArcAutoProvisioningConfigurati void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.W throw new FormatException($"The model {nameof(DefenderForServersAwsOfferingArcAutoProvisioningConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Proxy)) { writer.WritePropertyName("proxy"u8); @@ -51,7 +59,6 @@ void IJsonModel.W #endif } } - writer.WriteEndObject(); } DefenderForServersAwsOfferingArcAutoProvisioningConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingMdeAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingMdeAutoProvisioning.Serialization.cs index 3f98cab136c87..0f695515b901f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingMdeAutoProvisioning.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingMdeAutoProvisioning.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForServersAwsOfferingMdeAutoProvisioning : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Json throw new FormatException($"The model {nameof(DefenderForServersAwsOfferingMdeAutoProvisioning)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8Json #endif } } - writer.WriteEndObject(); } DefenderForServersAwsOfferingMdeAutoProvisioning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingSubPlan.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingSubPlan.Serialization.cs index 4be4e000d411c..b5a0e6b7e066f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingSubPlan.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingSubPlan.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DefenderForServersAwsOfferingSubPlan : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(DefenderForServersAwsOfferingSubPlan)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AvailableSubPlanType)) { writer.WritePropertyName("type"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } DefenderForServersAwsOfferingSubPlan IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScanners.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScanners.Serialization.cs index 1c39d563361e5..083953dd0dc68 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScanners.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScanners.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForServersAwsOfferingVmScanners : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(DefenderForServersAwsOfferingVmScanners)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } DefenderForServersAwsOfferingVmScanners IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScannersConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScannersConfiguration.Serialization.cs index 5ab99de918726..a08586f0b906b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScannersConfiguration.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScannersConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForServersAwsOfferingVmScannersConfiguration : IUtf void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8 throw new FormatException($"The model {nameof(DefenderForServersAwsOfferingVmScannersConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CloudRoleArn)) { writer.WritePropertyName("cloudRoleArn"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8 #endif } } - writer.WriteEndObject(); } DefenderForServersAwsOfferingVmScannersConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs index 981e2dda29b82..ff7a29ffd9541 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForServersAwsOfferingVulnerabilityAssessmentAutoPro void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs index f56e051ea21ff..8c030403da164 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DefenderForServersAwsOfferingVulnerabilityAssessmentAutoP void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOffering.Serialization.cs index b0217a9a7893b..c12782cde2c4b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOffering.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForServersGcpOffering : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(DefenderForServersGcpOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(DefenderForServers)) { writer.WritePropertyName("defenderForServers"u8); @@ -56,29 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WritePropertyName("vmScanners"u8); writer.WriteObjectValue(VmScanners, options); } - writer.WritePropertyName("offeringType"u8); - writer.WriteStringValue(OfferingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DefenderForServersGcpOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioning.Serialization.cs index eec3edd9d6617..ba9a40aa85ffe 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioning.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioning.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForServersGcpOfferingArcAutoProvisioning : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Json throw new FormatException($"The model {nameof(DefenderForServersGcpOfferingArcAutoProvisioning)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8Json #endif } } - writer.WriteEndObject(); } DefenderForServersGcpOfferingArcAutoProvisioning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs index a78cea8b2689b..7702cd0267965 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForServersGcpOfferingArcAutoProvisioningConfigurati void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.W throw new FormatException($"The model {nameof(DefenderForServersGcpOfferingArcAutoProvisioningConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Proxy)) { writer.WritePropertyName("proxy"u8); @@ -51,7 +59,6 @@ void IJsonModel.W #endif } } - writer.WriteEndObject(); } DefenderForServersGcpOfferingArcAutoProvisioningConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingMdeAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingMdeAutoProvisioning.Serialization.cs index a055330b39f66..d0dd7326e091a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingMdeAutoProvisioning.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingMdeAutoProvisioning.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForServersGcpOfferingMdeAutoProvisioning : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Json throw new FormatException($"The model {nameof(DefenderForServersGcpOfferingMdeAutoProvisioning)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8Json #endif } } - writer.WriteEndObject(); } DefenderForServersGcpOfferingMdeAutoProvisioning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingSubPlan.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingSubPlan.Serialization.cs index d0caf590f66f9..867f4e61ba4c0 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingSubPlan.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingSubPlan.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DefenderForServersGcpOfferingSubPlan : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(DefenderForServersGcpOfferingSubPlan)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AvailableSubPlanType)) { writer.WritePropertyName("type"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } DefenderForServersGcpOfferingSubPlan IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScanners.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScanners.Serialization.cs index 4abb46894346a..150412b97ce52 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScanners.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScanners.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForServersGcpOfferingVmScanners : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(DefenderForServersGcpOfferingVmScanners)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } DefenderForServersGcpOfferingVmScanners IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScannersConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScannersConfiguration.Serialization.cs index 2b95efa413e0a..16296f7fe7578 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScannersConfiguration.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScannersConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForServersGcpOfferingVmScannersConfiguration : IUtf void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8 throw new FormatException($"The model {nameof(DefenderForServersGcpOfferingVmScannersConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ScanningMode)) { writer.WritePropertyName("scanningMode"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8 #endif } } - writer.WriteEndObject(); } DefenderForServersGcpOfferingVmScannersConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs index 9a80b45a471e3..85c73c8ebd0c2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefenderForServersGcpOfferingVulnerabilityAssessmentAutoPro void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs index 0994c3eda6551..a0bd8cfcef02a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DefenderForServersGcpOfferingVulnerabilityAssessmentAutoP void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DenylistCustomAlertRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DenylistCustomAlertRule.Serialization.cs index 1e8bc6fad3b5a..c3253fd29116f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DenylistCustomAlertRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DenylistCustomAlertRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class DenylistCustomAlertRule : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DenylistCustomAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("denylistValues"u8); writer.WriteStartArray(); foreach (var item in DenylistValues) @@ -33,41 +42,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteStringValue(item); } writer.WriteEndArray(); - if (options.Format != "W" && Optional.IsDefined(ValueType)) - { - writer.WritePropertyName("valueType"u8); - writer.WriteStringValue(ValueType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DenylistCustomAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsAuthorization.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsAuthorization.Serialization.cs index 0797ea0adef6e..1e99cfed2523e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsAuthorization.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsAuthorization.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DevOpsAuthorization : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(DevOpsAuthorization)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } DevOpsAuthorization IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationListResponse.Serialization.cs index af6ab1b2b20fb..0975c4eae6415 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationListResponse.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationListResponse.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DevOpsConfigurationListResponse : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(DevOpsConfigurationListResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } DevOpsConfigurationListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationProperties.Serialization.cs index e8af4c8cf7c6f..9ef58dc46249c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsConfigurationProperties : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(DevOpsConfigurationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage)) { writer.WritePropertyName("provisioningStatusMessage"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } DevOpsConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsOrgProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsOrgProperties.Serialization.cs index 2469aa1e3ef8d..6a46671182ea7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsOrgProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsOrgProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsOrgProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(DevOpsOrgProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage)) { writer.WritePropertyName("provisioningStatusMessage"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } DevOpsOrgProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsProjectProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsProjectProperties.Serialization.cs index 86451f775725b..3de42ebc20b6e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsProjectProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsProjectProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsProjectProperties : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DevOpsProjectProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage)) { writer.WritePropertyName("provisioningStatusMessage"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } DevOpsProjectProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsRepositoryProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsRepositoryProperties.Serialization.cs index 8141b5ac645e4..93d17ae02df75 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsRepositoryProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsRepositoryProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevOpsRepositoryProperties : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(DevOpsRepositoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage)) { writer.WritePropertyName("provisioningStatusMessage"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } DevOpsRepositoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DeviceSecurityGroupList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DeviceSecurityGroupList.Serialization.cs index d5601d56a14d1..be9fb8139c4e4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DeviceSecurityGroupList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DeviceSecurityGroupList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DeviceSecurityGroupList : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DeviceSecurityGroupList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } DeviceSecurityGroupList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DirectMethodInvokesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DirectMethodInvokesNotInAllowedRange.Serialization.cs index 740abc25ab940..83bbb09c9b763 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DirectMethodInvokesNotInAllowedRange.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DirectMethodInvokesNotInAllowedRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class DirectMethodInvokesNotInAllowedRange : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(DirectMethodInvokesNotInAllowedRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("timeWindowSize"u8); - writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DirectMethodInvokesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolution.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolution.Serialization.cs index f7cc39c19d8c1..91587a103c3f7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolution.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolution.Serialization.cs @@ -19,6 +19,15 @@ public partial class DiscoveredSecuritySolution : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(DiscoveredSecuritySolution)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("securityFamily"u8); @@ -63,22 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("sku"u8); writer.WriteStringValue(Sku); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DiscoveredSecuritySolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolutionList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolutionList.Serialization.cs index 44c5a05db3137..9f2b95affe349 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolutionList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolutionList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DiscoveredSecuritySolutionList : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(DiscoveredSecuritySolutionList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } DiscoveredSecuritySolutionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EffectiveNetworkSecurityGroups.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EffectiveNetworkSecurityGroups.Serialization.cs index a90038e3917ca..feeeaef2bce81 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EffectiveNetworkSecurityGroups.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EffectiveNetworkSecurityGroups.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveNetworkSecurityGroups : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(EffectiveNetworkSecurityGroups)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NetworkInterface)) { writer.WritePropertyName("networkInterface"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } EffectiveNetworkSecurityGroups IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EnvironmentDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EnvironmentDetails.Serialization.cs index 12674655cc5d2..c80fcc2c7c829 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EnvironmentDetails.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EnvironmentDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class EnvironmentDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EnvironmentDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NativeResourceId)) { writer.WritePropertyName("nativeResourceId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } EnvironmentDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExecuteGovernanceRuleParams.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExecuteGovernanceRuleParams.Serialization.cs index e9c7907d55ef8..9167c39180862 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExecuteGovernanceRuleParams.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExecuteGovernanceRuleParams.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExecuteGovernanceRuleParams : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ExecuteGovernanceRuleParams)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Override)) { writer.WritePropertyName("override"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ExecuteGovernanceRuleParams IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExtensionOperationStatus.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExtensionOperationStatus.Serialization.cs index a778564be26eb..473b655423eee 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExtensionOperationStatus.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExtensionOperationStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExtensionOperationStatus : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ExtensionOperationStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ExtensionOperationStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolution.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolution.Serialization.cs index 6b339a411a33e..3a0fd43d9cceb 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolution.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolution.Serialization.cs @@ -17,6 +17,15 @@ public partial class ExternalSecuritySolution : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -24,7 +33,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ExternalSecuritySolution)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Kind != null) { writer.WritePropertyName("kind"u8); @@ -39,42 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExternalSecuritySolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionList.Serialization.cs index 8993346d77fa9..acacd54d362f8 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExternalSecuritySolutionList : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ExternalSecuritySolutionList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ExternalSecuritySolutionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionProperties.Serialization.cs index fd56c4c57843d..79674de8720b1 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExternalSecuritySolutionProperties : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ExternalSecuritySolutionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DeviceVendor)) { writer.WritePropertyName("deviceVendor"u8); @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, } #endif } - writer.WriteEndObject(); } ExternalSecuritySolutionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FailedLocalLoginsNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FailedLocalLoginsNotInAllowedRange.Serialization.cs index 7411c8fc48aca..adda12ad3c686 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FailedLocalLoginsNotInAllowedRange.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FailedLocalLoginsNotInAllowedRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class FailedLocalLoginsNotInAllowedRange : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(FailedLocalLoginsNotInAllowedRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("timeWindowSize"u8); - writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } FailedLocalLoginsNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FileUploadsNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FileUploadsNotInAllowedRange.Serialization.cs index 5919ea76565b0..3d4395a60e611 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FileUploadsNotInAllowedRange.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FileUploadsNotInAllowedRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class FileUploadsNotInAllowedRange : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(FileUploadsNotInAllowedRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("timeWindowSize"u8); - writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } FileUploadsNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpCredentialsDetailsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpCredentialsDetailsProperties.Serialization.cs index fa0780963564a..08dc869d989f6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpCredentialsDetailsProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpCredentialsDetailsProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class GcpCredentialsDetailsProperties : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(GcpCredentialsDetailsProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("organizationId"u8); writer.WriteStringValue(OrganizationId); writer.WritePropertyName("type"u8); @@ -48,39 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteStringValue(AuthProviderX509CertUri.AbsoluteUri); writer.WritePropertyName("clientX509CertUrl"u8); writer.WriteStringValue(ClientX509CertUri.AbsoluteUri); - if (options.Format != "W" && Optional.IsDefined(AuthenticationProvisioningState)) - { - writer.WritePropertyName("authenticationProvisioningState"u8); - writer.WriteStringValue(AuthenticationProvisioningState.Value.ToString()); - } - if (options.Format != "W" && Optional.IsCollectionDefined(GrantedPermissions)) - { - writer.WritePropertyName("grantedPermissions"u8); - writer.WriteStartArray(); - foreach (var item in GrantedPermissions) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GcpCredentialsDetailsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForDatabasesArcAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForDatabasesArcAutoProvisioning.Serialization.cs index 0bacd8a5f797c..01191f4018472 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForDatabasesArcAutoProvisioning.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForDatabasesArcAutoProvisioning.Serialization.cs @@ -18,6 +18,15 @@ public partial class GcpDefenderForDatabasesArcAutoProvisioning : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(GcpDefenderForDatabasesArcAutoProvisioning)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ServiceAccountEmailAddress)) { writer.WritePropertyName("serviceAccountEmailAddress"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } GcpDefenderForDatabasesArcAutoProvisioning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForServersInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForServersInfo.Serialization.cs index e7986e2bc49f4..3ba1a5adfb368 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForServersInfo.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForServersInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class GcpDefenderForServersInfo : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(GcpDefenderForServersInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(WorkloadIdentityProviderId)) { writer.WritePropertyName("workloadIdentityProviderId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } GcpDefenderForServersInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpMemberOrganizationalInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpMemberOrganizationalInfo.Serialization.cs index bef76af6cb073..80623d3dc3f27 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpMemberOrganizationalInfo.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpMemberOrganizationalInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class GcpMemberOrganizationalInfo : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(GcpMemberOrganizationalInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ParentHierarchyId)) { writer.WritePropertyName("parentHierarchyId"u8); @@ -36,24 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WritePropertyName("managementProjectNumber"u8); writer.WriteStringValue(ManagementProjectNumber); } - writer.WritePropertyName("organizationMembershipType"u8); - writer.WriteStringValue(OrganizationMembershipType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GcpMemberOrganizationalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpOrganizationalInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpOrganizationalInfo.Serialization.cs index 9652911f1e2c1..ef4c77b4f548e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpOrganizationalInfo.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpOrganizationalInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class GcpOrganizationalInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(GcpOrganizationalInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("organizationMembershipType"u8); writer.WriteStringValue(OrganizationMembershipType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } GcpOrganizationalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpParentOrganizationalInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpParentOrganizationalInfo.Serialization.cs index dfe9c567f035d..6207650486ac1 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpParentOrganizationalInfo.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpParentOrganizationalInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class GcpParentOrganizationalInfo : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(GcpParentOrganizationalInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(ExcludedProjectNumbers)) { writer.WritePropertyName("excludedProjectNumbers"u8); @@ -51,24 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WritePropertyName("organizationName"u8); writer.WriteStringValue(OrganizationName); } - writer.WritePropertyName("organizationMembershipType"u8); - writer.WriteStringValue(OrganizationMembershipType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GcpParentOrganizationalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectDetails.Serialization.cs index b472c3157ac70..c5c32c3d3de41 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectDetails.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class GcpProjectDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(GcpProjectDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProjectNumber)) { writer.WritePropertyName("projectNumber"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } GcpProjectDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectEnvironment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectEnvironment.Serialization.cs index eb6a7520f84e3..93d1ff290a4d5 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectEnvironment.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectEnvironment.Serialization.cs @@ -18,6 +18,15 @@ public partial class GcpProjectEnvironment : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(GcpProjectEnvironment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(OrganizationalData)) { writer.WritePropertyName("organizationalData"u8); @@ -41,24 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WritePropertyName("scanInterval"u8); writer.WriteNumberValue(ScanInterval.Value); } - writer.WritePropertyName("environmentType"u8); - writer.WriteStringValue(EnvironmentType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GcpProjectEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GetSensitivitySettingsResponsePropertiesMipInformation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GetSensitivitySettingsResponsePropertiesMipInformation.Serialization.cs index 2a538b6632611..b499efa469457 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GetSensitivitySettingsResponsePropertiesMipInformation.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GetSensitivitySettingsResponsePropertiesMipInformation.Serialization.cs @@ -18,6 +18,15 @@ public partial class GetSensitivitySettingsResponsePropertiesMipInformation : IU void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Ut throw new FormatException($"The model {nameof(GetSensitivitySettingsResponsePropertiesMipInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MipIntegrationStatus)) { writer.WritePropertyName("mipIntegrationStatus"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Ut #endif } } - writer.WriteEndObject(); } GetSensitivitySettingsResponsePropertiesMipInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubOwnerListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubOwnerListResponse.Serialization.cs index 9d0e9f968dc26..432c5bb930d06 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubOwnerListResponse.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubOwnerListResponse.Serialization.cs @@ -18,6 +18,15 @@ internal partial class GitHubOwnerListResponse : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(GitHubOwnerListResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } GitHubOwnerListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubRepositoryListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubRepositoryListResponse.Serialization.cs index 6a3495f3ca0bb..7586a93441db3 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubRepositoryListResponse.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubRepositoryListResponse.Serialization.cs @@ -18,6 +18,15 @@ internal partial class GitHubRepositoryListResponse : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(GitHubRepositoryListResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } GitHubRepositoryListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabGroupListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabGroupListResponse.Serialization.cs index dca4c98478248..9fac0699b2a87 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabGroupListResponse.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabGroupListResponse.Serialization.cs @@ -18,6 +18,15 @@ internal partial class GitLabGroupListResponse : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(GitLabGroupListResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } GitLabGroupListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabProjectListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabProjectListResponse.Serialization.cs index dbd789edcc792..e824c5b2d28d4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabProjectListResponse.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabProjectListResponse.Serialization.cs @@ -18,6 +18,15 @@ internal partial class GitLabProjectListResponse : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(GitLabProjectListResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } GitLabProjectListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GithubScopeEnvironment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GithubScopeEnvironment.Serialization.cs index 497ce96246589..4c738fe965c72 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GithubScopeEnvironment.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GithubScopeEnvironment.Serialization.cs @@ -18,6 +18,15 @@ public partial class GithubScopeEnvironment : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(GithubScopeEnvironment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("environmentType"u8); - writer.WriteStringValue(EnvironmentType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } GithubScopeEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitlabScopeEnvironment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitlabScopeEnvironment.Serialization.cs index 9cb6959e0bbc9..a19f034551e14 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitlabScopeEnvironment.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitlabScopeEnvironment.Serialization.cs @@ -18,6 +18,15 @@ public partial class GitlabScopeEnvironment : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(GitlabScopeEnvironment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("environmentType"u8); - writer.WriteStringValue(EnvironmentType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } GitlabScopeEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentAdditionalInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentAdditionalInfo.Serialization.cs index fdc6734566c48..a636a1236f2cb 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentAdditionalInfo.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentAdditionalInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class GovernanceAssignmentAdditionalInfo : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(GovernanceAssignmentAdditionalInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TicketNumber)) { writer.WritePropertyName("ticketNumber"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } GovernanceAssignmentAdditionalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentsList.Serialization.cs index 39dc1d71f0a45..49aff729b2d3a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentsList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentsList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class GovernanceAssignmentsList : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(GovernanceAssignmentsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } GovernanceAssignmentsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceEmailNotification.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceEmailNotification.Serialization.cs index c2b6164f7ac84..ea2398eda50f6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceEmailNotification.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceEmailNotification.Serialization.cs @@ -18,6 +18,15 @@ public partial class GovernanceEmailNotification : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(GovernanceEmailNotification)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsManagerEmailNotificationDisabled)) { writer.WritePropertyName("disableManagerEmailNotification"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } GovernanceEmailNotification IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleEmailNotification.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleEmailNotification.Serialization.cs index 1123e18e5fc04..ddf4aa618c944 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleEmailNotification.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleEmailNotification.Serialization.cs @@ -18,6 +18,15 @@ public partial class GovernanceRuleEmailNotification : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(GovernanceRuleEmailNotification)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsManagerEmailNotificationDisabled)) { writer.WritePropertyName("disableManagerEmailNotification"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } GovernanceRuleEmailNotification IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleList.Serialization.cs index fa1410c998be9..204949012cce2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class GovernanceRuleList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(GovernanceRuleList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } GovernanceRuleList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleMetadata.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleMetadata.Serialization.cs index 9e7b67f74bc90..8ceff44496154 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleMetadata.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleMetadata.Serialization.cs @@ -18,6 +18,15 @@ public partial class GovernanceRuleMetadata : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(GovernanceRuleMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CreatedBy)) { writer.WritePropertyName("createdBy"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } GovernanceRuleMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleOwnerSource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleOwnerSource.Serialization.cs index a5895600d3c67..92a10ea08d5cd 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleOwnerSource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleOwnerSource.Serialization.cs @@ -18,6 +18,15 @@ public partial class GovernanceRuleOwnerSource : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(GovernanceRuleOwnerSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceType)) { writer.WritePropertyName("type"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } GovernanceRuleOwnerSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthDataClassification.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthDataClassification.Serialization.cs index 573dfaaec593a..95ddce799580b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthDataClassification.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthDataClassification.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthDataClassification : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(HealthDataClassification)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Component)) { writer.WritePropertyName("component"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } HealthDataClassification IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportResourceDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportResourceDetails.Serialization.cs index 135481623d55b..ec64fef97d86d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportResourceDetails.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportResourceDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthReportResourceDetails : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(HealthReportResourceDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Source)) { writer.WritePropertyName("source"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } HealthReportResourceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportStatus.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportStatus.Serialization.cs index 26a7428fdf496..d2e34b378aef3 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportStatus.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthReportStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(HealthReportStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } HealthReportStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportsList.Serialization.cs index f8410324e0010..2121a90a68b4c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportsList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportsList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class HealthReportsList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(HealthReportsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } HealthReportsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DMessagesNotInAllowedRange.Serialization.cs index 187d0320c6611..5449b18cadbe9 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DMessagesNotInAllowedRange.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DMessagesNotInAllowedRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class HttpC2DMessagesNotInAllowedRange : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(HttpC2DMessagesNotInAllowedRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("timeWindowSize"u8); - writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } HttpC2DMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DRejectedMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DRejectedMessagesNotInAllowedRange.Serialization.cs index 81ff195895677..609909962c44e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DRejectedMessagesNotInAllowedRange.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DRejectedMessagesNotInAllowedRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class HttpC2DRejectedMessagesNotInAllowedRange : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(HttpC2DRejectedMessagesNotInAllowedRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("timeWindowSize"u8); - writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } HttpC2DRejectedMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpD2CMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpD2CMessagesNotInAllowedRange.Serialization.cs index 7b3db00e1a154..851279257ec4c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpD2CMessagesNotInAllowedRange.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpD2CMessagesNotInAllowedRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class HttpD2CMessagesNotInAllowedRange : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(HttpD2CMessagesNotInAllowedRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("timeWindowSize"u8); - writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } HttpD2CMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HybridComputeSettingsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HybridComputeSettingsProperties.Serialization.cs index 36f236b135116..367493c680a96 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HybridComputeSettingsProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HybridComputeSettingsProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class HybridComputeSettingsProperties : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(HybridComputeSettingsProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(HybridComputeProvisioningState)) { writer.WritePropertyName("hybridComputeProvisioningState"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } HybridComputeSettingsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionAwsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionAwsOffering.Serialization.cs index bef0df1df5245..820b412ef8773 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionAwsOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionAwsOffering.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformationProtectionAwsOffering : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(InformationProtectionAwsOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(InformationProtection)) { writer.WritePropertyName("informationProtection"u8); writer.WriteObjectValue(InformationProtection, options); } - writer.WritePropertyName("offeringType"u8); - writer.WriteStringValue(OfferingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } InformationProtectionAwsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionKeyword.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionKeyword.Serialization.cs index cc58f2cb41570..f5e4618187efe 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionKeyword.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionKeyword.Serialization.cs @@ -18,6 +18,15 @@ public partial class InformationProtectionKeyword : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(InformationProtectionKeyword)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Pattern)) { writer.WritePropertyName("pattern"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } InformationProtectionKeyword IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicy.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicy.Serialization.cs index 2c86c3892e7be..a061b5fd2ee9f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicy.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicy.Serialization.cs @@ -19,6 +19,15 @@ public partial class InformationProtectionPolicy : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(InformationProtectionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LastModifiedUtc)) @@ -82,22 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteEndObject(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } InformationProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicyList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicyList.Serialization.cs index c7b09f66c648d..53205cb615c1a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicyList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicyList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class InformationProtectionPolicyList : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(InformationProtectionPolicyList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } InformationProtectionPolicyList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertList.Serialization.cs index 34950a11e894c..5c8ee61ed1ab7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IotSecurityAggregatedAlertList : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(IotSecurityAggregatedAlertList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } IotSecurityAggregatedAlertList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertTopDevice.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertTopDevice.Serialization.cs index 7ea376dc971c1..cae1b9be9cc7d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertTopDevice.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertTopDevice.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotSecurityAggregatedAlertTopDevice : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(IotSecurityAggregatedAlertTopDevice)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DeviceId)) { writer.WritePropertyName("deviceId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } IotSecurityAggregatedAlertTopDevice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedRecommendationList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedRecommendationList.Serialization.cs index 8037eb70dce68..9a734a74fa335 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedRecommendationList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedRecommendationList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IotSecurityAggregatedRecommendationList : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(IotSecurityAggregatedRecommendationList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } IotSecurityAggregatedRecommendationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAlertedDevice.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAlertedDevice.Serialization.cs index 617ca4fb34cc2..001cd5a96a502 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAlertedDevice.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAlertedDevice.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotSecurityAlertedDevice : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(IotSecurityAlertedDevice)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DeviceId)) { writer.WritePropertyName("deviceId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } IotSecurityAlertedDevice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceAlert.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceAlert.Serialization.cs index 1ffb2a26e0dbf..c7af38045d296 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceAlert.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceAlert.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotSecurityDeviceAlert : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(IotSecurityDeviceAlert)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AlertDisplayName)) { writer.WritePropertyName("alertDisplayName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } IotSecurityDeviceAlert IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceRecommendation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceRecommendation.Serialization.cs index 9ca47e720879a..e9209ca850b9b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceRecommendation.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceRecommendation.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotSecurityDeviceRecommendation : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(IotSecurityDeviceRecommendation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(RecommendationDisplayName)) { writer.WritePropertyName("recommendationDisplayName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } IotSecurityDeviceRecommendation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelDevicesMetrics.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelDevicesMetrics.Serialization.cs index c2bb50446acf8..ac5c8e81f119e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelDevicesMetrics.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelDevicesMetrics.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotSecuritySolutionAnalyticsModelDevicesMetrics : IUtf8Json void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(IotSecuritySolutionAnalyticsModelDevicesMetrics)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Date)) { writer.WritePropertyName("date"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonW #endif } } - writer.WriteEndObject(); } IotSecuritySolutionAnalyticsModelDevicesMetrics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelList.Serialization.cs index 65456ecb5d361..d3c4ec2d35f1e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IotSecuritySolutionAnalyticsModelList : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(IotSecuritySolutionAnalyticsModelList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } IotSecuritySolutionAnalyticsModelList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionPatch.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionPatch.Serialization.cs index d69875ff8b2e2..ac0b62ca1fa7e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionPatch.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotSecuritySolutionPatch : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,18 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(IotSecuritySolutionPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(UserDefinedResources)) @@ -55,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IotSecuritySolutionPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionsList.Serialization.cs index e51bbfc12c47d..23aef47a56dd1 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionsList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionsList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IotSecuritySolutionsList : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(IotSecuritySolutionsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } IotSecuritySolutionsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSeverityMetrics.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSeverityMetrics.Serialization.cs index ec6bbc64b175c..156b98e95bea9 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSeverityMetrics.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSeverityMetrics.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotSeverityMetrics : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(IotSeverityMetrics)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(High)) { writer.WritePropertyName("high"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } IotSeverityMetrics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPoliciesList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPoliciesList.Serialization.cs index ff0fd683dcb97..2c563ad0269fd 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPoliciesList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPoliciesList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class JitNetworkAccessPoliciesList : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(JitNetworkAccessPoliciesList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } JitNetworkAccessPoliciesList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateContent.Serialization.cs index 861a0795921a0..7af36bd0a6f86 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateContent.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class JitNetworkAccessPolicyInitiateContent : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(JitNetworkAccessPolicyInitiateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("virtualMachines"u8); writer.WriteStartArray(); foreach (var item in VirtualMachines) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } JitNetworkAccessPolicyInitiateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiatePort.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiatePort.Serialization.cs index c261b90a23358..7c7ad8a5cca67 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiatePort.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiatePort.Serialization.cs @@ -18,6 +18,15 @@ public partial class JitNetworkAccessPolicyInitiatePort : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(JitNetworkAccessPolicyInitiatePort)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("number"u8); writer.WriteNumberValue(Number); if (Optional.IsDefined(AllowedSourceAddressPrefix)) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } JitNetworkAccessPolicyInitiatePort IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateVirtualMachine.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateVirtualMachine.Serialization.cs index 31a3ccdae641f..911b028519f10 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateVirtualMachine.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateVirtualMachine.Serialization.cs @@ -18,6 +18,15 @@ public partial class JitNetworkAccessPolicyInitiateVirtualMachine : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(JitNetworkAccessPolicyInitiateVirtualMachine)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("ports"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } JitNetworkAccessPolicyInitiateVirtualMachine IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyVirtualMachine.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyVirtualMachine.Serialization.cs index 6fd35b67740ac..6b7c4a81ae855 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyVirtualMachine.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyVirtualMachine.Serialization.cs @@ -18,6 +18,15 @@ public partial class JitNetworkAccessPolicyVirtualMachine : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(JitNetworkAccessPolicyVirtualMachine)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("ports"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } JitNetworkAccessPolicyVirtualMachine IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPortRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPortRule.Serialization.cs index 09004a75336a5..9c07c742f53ac 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPortRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPortRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class JitNetworkAccessPortRule : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(JitNetworkAccessPortRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("number"u8); writer.WriteNumberValue(Number); writer.WritePropertyName("protocol"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } JitNetworkAccessPortRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestInfo.Serialization.cs index 92128688808f8..7fc93a432b709 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestInfo.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class JitNetworkAccessRequestInfo : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(JitNetworkAccessRequestInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("virtualMachines"u8); writer.WriteStartArray(); foreach (var item in VirtualMachines) @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } JitNetworkAccessRequestInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestPort.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestPort.Serialization.cs index f99ff6aa09ba1..1aa6d1a817d10 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestPort.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestPort.Serialization.cs @@ -18,6 +18,15 @@ public partial class JitNetworkAccessRequestPort : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(JitNetworkAccessRequestPort)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("number"u8); writer.WriteNumberValue(Number); if (Optional.IsDefined(AllowedSourceAddressPrefix)) @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } JitNetworkAccessRequestPort IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestVirtualMachine.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestVirtualMachine.Serialization.cs index 00607185d8e8f..13db8e841ca55 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestVirtualMachine.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestVirtualMachine.Serialization.cs @@ -18,6 +18,15 @@ public partial class JitNetworkAccessRequestVirtualMachine : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(JitNetworkAccessRequestVirtualMachine)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("ports"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } JitNetworkAccessRequestVirtualMachine IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ListCustomAlertRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ListCustomAlertRule.Serialization.cs index df6538e763be1..7ab7a5c52c885 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ListCustomAlertRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ListCustomAlertRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ListCustomAlertRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,42 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ListCustomAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ValueType)) { writer.WritePropertyName("valueType"u8); writer.WriteStringValue(ValueType.Value.ToString()); } - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ListCustomAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LocalUserNotAllowed.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LocalUserNotAllowed.Serialization.cs index a8f4383ee2e64..bf105962ea2b5 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LocalUserNotAllowed.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LocalUserNotAllowed.Serialization.cs @@ -18,6 +18,15 @@ public partial class LocalUserNotAllowed : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,49 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(LocalUserNotAllowed)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("allowlistValues"u8); - writer.WriteStartArray(); - foreach (var item in AllowlistValues) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - if (options.Format != "W" && Optional.IsDefined(ValueType)) - { - writer.WritePropertyName("valueType"u8); - writer.WriteStringValue(ValueType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } LocalUserNotAllowed IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LogAnalyticsIdentifier.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LogAnalyticsIdentifier.Serialization.cs index 8dd229893f76c..adb0b90ad0fd6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LogAnalyticsIdentifier.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LogAnalyticsIdentifier.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogAnalyticsIdentifier : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(LogAnalyticsIdentifier)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(WorkspaceId)) { writer.WritePropertyName("workspaceId"u8); @@ -46,24 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("agentId"u8); writer.WriteStringValue(AgentId.Value); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceIdentifierType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LogAnalyticsIdentifier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboarding.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboarding.Serialization.cs index 2c7a0ebb2332c..3d558c8684591 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboarding.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboarding.Serialization.cs @@ -19,6 +19,15 @@ public partial class MdeOnboarding : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(MdeOnboarding)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(OnboardingPackageWindows)) @@ -60,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt writer.WriteBase64StringValue(OnboardingPackageLinux, "D"); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MdeOnboarding IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboardingDataList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboardingDataList.Serialization.cs index 746fac5249e56..7357c01caa15a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboardingDataList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboardingDataList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MdeOnboardingDataList : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(MdeOnboardingDataList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } MdeOnboardingDataList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MipSensitivityLabel.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MipSensitivityLabel.Serialization.cs index 88d661dab8dbc..432d132e90015 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MipSensitivityLabel.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MipSensitivityLabel.Serialization.cs @@ -18,6 +18,15 @@ public partial class MipSensitivityLabel : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MipSensitivityLabel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } MipSensitivityLabel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DMessagesNotInAllowedRange.Serialization.cs index 29b7955c3a6a7..c51db113a2307 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DMessagesNotInAllowedRange.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DMessagesNotInAllowedRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class MqttC2DMessagesNotInAllowedRange : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(MqttC2DMessagesNotInAllowedRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("timeWindowSize"u8); - writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } MqttC2DMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DRejectedMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DRejectedMessagesNotInAllowedRange.Serialization.cs index a2c49766a4050..d8177bbc7633c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DRejectedMessagesNotInAllowedRange.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DRejectedMessagesNotInAllowedRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class MqttC2DRejectedMessagesNotInAllowedRange : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(MqttC2DRejectedMessagesNotInAllowedRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("timeWindowSize"u8); - writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } MqttC2DRejectedMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttD2CMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttD2CMessagesNotInAllowedRange.Serialization.cs index 4af3d363ef23e..eb0a1249f9da9 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttD2CMessagesNotInAllowedRange.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttD2CMessagesNotInAllowedRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class MqttD2CMessagesNotInAllowedRange : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(MqttD2CMessagesNotInAllowedRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("timeWindowSize"u8); - writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } MqttD2CMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseResourceDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseResourceDetails.Serialization.cs index ac9e7abc5535e..3c5b2f5d23937 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseResourceDetails.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseResourceDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class OnPremiseResourceDetails : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(OnPremiseResourceDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("workspaceId"u8); writer.WriteStringValue(WorkspaceId); writer.WritePropertyName("vmuuid"u8); @@ -34,24 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(SourceComputerId); writer.WritePropertyName("machineName"u8); writer.WriteStringValue(MachineName); - writer.WritePropertyName("source"u8); - writer.WriteStringValue(Source.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OnPremiseResourceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseSqlResourceDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseSqlResourceDetails.Serialization.cs index e65a515b1ef4a..7d589f02f29fe 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseSqlResourceDetails.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseSqlResourceDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class OnPremiseSqlResourceDetails : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,37 +34,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(OnPremiseSqlResourceDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("serverName"u8); writer.WriteStringValue(ServerName); writer.WritePropertyName("databaseName"u8); writer.WriteStringValue(DatabaseName); - writer.WritePropertyName("workspaceId"u8); - writer.WriteStringValue(WorkspaceId); - writer.WritePropertyName("vmuuid"u8); - writer.WriteStringValue(VmUuid); - writer.WritePropertyName("sourceComputerId"u8); - writer.WriteStringValue(SourceComputerId); - writer.WritePropertyName("machineName"u8); - writer.WriteStringValue(MachineName); - writer.WritePropertyName("source"u8); - writer.WriteStringValue(Source.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OnPremiseSqlResourceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OperationStatusAutoGenerated.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OperationStatusAutoGenerated.Serialization.cs index 77753a58676f8..c4a7041e75f40 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OperationStatusAutoGenerated.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OperationStatusAutoGenerated.Serialization.cs @@ -18,6 +18,15 @@ public partial class OperationStatusAutoGenerated : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(OperationStatusAutoGenerated)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } OperationStatusAutoGenerated IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendation.Serialization.cs index 3942827d7f42e..f99adf501c9a7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendation.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendation.Serialization.cs @@ -18,6 +18,15 @@ public partial class PathRecommendation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PathRecommendation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Path)) { writer.WritePropertyName("path"u8); @@ -96,7 +104,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } PathRecommendation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PlanExtension.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PlanExtension.Serialization.cs index b145e6bd24a2f..4457af3104c91 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PlanExtension.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PlanExtension.Serialization.cs @@ -18,6 +18,15 @@ public partial class PlanExtension : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(PlanExtension)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("isEnabled"u8); @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } PlanExtension IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PricingList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PricingList.Serialization.cs index fa5f92ea88f72..8a1a5e0113344 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PricingList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PricingList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PricingList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(PricingList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } PricingList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProcessNotAllowed.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProcessNotAllowed.Serialization.cs index 4071fae85fc62..c84c7e09f0fa8 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProcessNotAllowed.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProcessNotAllowed.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProcessNotAllowed : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,49 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ProcessNotAllowed)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("allowlistValues"u8); - writer.WriteStartArray(); - foreach (var item in AllowlistValues) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - if (options.Format != "W" && Optional.IsDefined(ValueType)) - { - writer.WritePropertyName("valueType"u8); - writer.WriteStringValue(ValueType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ProcessNotAllowed IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProxyServerProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProxyServerProperties.Serialization.cs index 2626e1b15f0a8..b736424813c9b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProxyServerProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProxyServerProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProxyServerProperties : IUtf8JsonSerializable, IJsonModel

((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ProxyServerProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IP)) { writer.WritePropertyName("ip"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ProxyServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/QueuePurgesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/QueuePurgesNotInAllowedRange.Serialization.cs index e05af2ea3bffa..d3862f757b9bf 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/QueuePurgesNotInAllowedRange.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/QueuePurgesNotInAllowedRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class QueuePurgesNotInAllowedRange : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(QueuePurgesNotInAllowedRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("timeWindowSize"u8); - writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } QueuePurgesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendationConfigurationProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendationConfigurationProperties.Serialization.cs index 5dbcbf9ca3622..f1f94a535a3cd 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendationConfigurationProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendationConfigurationProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class RecommendationConfigurationProperties : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(RecommendationConfigurationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("recommendationType"u8); writer.WriteStringValue(RecommendationType.ToString()); if (options.Format != "W" && Optional.IsDefined(Name)) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } RecommendationConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendedSecurityRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendedSecurityRule.Serialization.cs index e9c9645ed9257..485bd9ce708c9 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendedSecurityRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendedSecurityRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class RecommendedSecurityRule : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(RecommendedSecurityRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } RecommendedSecurityRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceAssessmentList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceAssessmentList.Serialization.cs index 00f11a2b9efe2..988ec6dcbdcc4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceAssessmentList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceAssessmentList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RegulatoryComplianceAssessmentList : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(RegulatoryComplianceAssessmentList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } RegulatoryComplianceAssessmentList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceControlList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceControlList.Serialization.cs index 7e3e05fd0f6b9..e962569339ca4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceControlList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceControlList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RegulatoryComplianceControlList : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(RegulatoryComplianceControlList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } RegulatoryComplianceControlList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceStandardList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceStandardList.Serialization.cs index c9c1f904fa0c4..94e12bbefd2d3 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceStandardList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceStandardList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RegulatoryComplianceStandardList : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(RegulatoryComplianceStandardList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } RegulatoryComplianceStandardList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RemediationEta.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RemediationEta.Serialization.cs index bff47b5e02b67..39be48eeef34b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RemediationEta.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RemediationEta.Serialization.cs @@ -18,6 +18,15 @@ public partial class RemediationEta : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(RemediationEta)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("eta"u8); writer.WriteStringValue(Eta, "O"); writer.WritePropertyName("justification"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } RemediationEta IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RuleResultsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RuleResultsProperties.Serialization.cs index 0bc309decc86e..8e48b88360550 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RuleResultsProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RuleResultsProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RuleResultsProperties : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(RuleResultsProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Results)) { writer.WritePropertyName("results"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } RuleResultsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResults.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResults.Serialization.cs index d8ccc2131e1f9..460c751552b78 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResults.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResults.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RulesResults : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(RulesResults)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } RulesResults IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResultsContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResultsContent.Serialization.cs index a84689b0640f3..5514234ded0a4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResultsContent.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResultsContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class RulesResultsContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(RulesResultsContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LatestScan)) { writer.WritePropertyName("latestScan"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } RulesResultsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ScanResults.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ScanResults.Serialization.cs index e905738cfcfde..1fb87e5245dc0 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ScanResults.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ScanResults.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ScanResults : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(ScanResults)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } ScanResults IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/Scans.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/Scans.Serialization.cs index 9d5ace8ffe320..3a02ab4271309 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/Scans.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/Scans.Serialization.cs @@ -18,6 +18,15 @@ internal partial class Scans : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions opt throw new FormatException($"The model {nameof(Scans)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions opt #endif } } - writer.WriteEndObject(); } Scans IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionItem.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionItem.Serialization.cs index a7a116a93eb28..cbf01ea6a304f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionItem.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecureScoreControlDefinitionItem : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecureScoreControlDefinitionItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayName)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecureScoreControlDefinitionItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionList.Serialization.cs index 5de5f2c69ee1f..af7eab9b65733 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecureScoreControlDefinitionList : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecureScoreControlDefinitionList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } SecureScoreControlDefinitionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionSource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionSource.Serialization.cs index b80bcdc818fff..0837eafb6975a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionSource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionSource.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecureScoreControlDefinitionSource : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecureScoreControlDefinitionSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceType)) { writer.WritePropertyName("sourceType"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SecureScoreControlDefinitionSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDetails.Serialization.cs index 0bbb97b523f22..65eef446ecd02 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDetails.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDetails.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecureScoreControlDetails : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecureScoreControlDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayName)) @@ -98,22 +87,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecureScoreControlDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlList.Serialization.cs index e74a86b20e0fb..bbde4ec95994e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecureScoreControlList : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SecureScoreControlList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SecureScoreControlList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoresList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoresList.Serialization.cs index a4b95a85872aa..5178ea16ad820 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoresList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoresList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecureScoresList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SecureScoresList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } SecureScoresList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertEntity.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertEntity.Serialization.cs index 2131e2eac38f7..ec5af689fa22e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertEntity.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertEntity.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAlertEntity : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SecurityAlertEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AlertEntityType)) { writer.WritePropertyName("type"u8); @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri } #endif } - writer.WriteEndObject(); } SecurityAlertEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertResourceIdentifier.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertResourceIdentifier.Serialization.cs index 1c3cd4624609c..4da0de624aa89 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertResourceIdentifier.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertResourceIdentifier.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAlertResourceIdentifier : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityAlertResourceIdentifier)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(ResourceIdentifierType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } SecurityAlertResourceIdentifier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorBundlesRequestProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorBundlesRequestProperties.Serialization.cs index 0e8c6cb3513a0..5848e58dd3a51 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorBundlesRequestProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorBundlesRequestProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAlertSimulatorBundlesRequestProperties : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(SecurityAlertSimulatorBundlesRequestProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Bundles)) { writer.WritePropertyName("bundles"u8); @@ -36,8 +45,6 @@ void IJsonModel.Write(Utf8JsonWr } writer.WriteEndArray(); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -50,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWr } #endif } - writer.WriteEndObject(); } SecurityAlertSimulatorBundlesRequestProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorContent.Serialization.cs index 041361daa05f5..4f6753f1eb18d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorContent.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAlertSimulatorContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityAlertSimulatorContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } SecurityAlertSimulatorContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorRequestProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorRequestProperties.Serialization.cs index d1e2b56373d31..94807e23ee5bf 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorRequestProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorRequestProperties.Serialization.cs @@ -17,6 +17,15 @@ public partial class SecurityAlertSimulatorRequestProperties : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -24,7 +33,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(SecurityAlertSimulatorRequestProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); foreach (var item in AdditionalProperties) @@ -39,7 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter wr } #endif } - writer.WriteEndObject(); } SecurityAlertSimulatorRequestProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSupportingEvidence.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSupportingEvidence.Serialization.cs index 6f3a119f67eba..97944ea37172e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSupportingEvidence.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSupportingEvidence.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAlertSupportingEvidence : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityAlertSupportingEvidence)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(SecurityAlertSupportingEvidenceType)) { writer.WritePropertyName("type"u8); @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } #endif } - writer.WriteEndObject(); } SecurityAlertSupportingEvidence IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSyncSettings.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSyncSettings.Serialization.cs index 1c7482f58525b..583b1b0265b9f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSyncSettings.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSyncSettings.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityAlertSyncSettings : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,29 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecurityAlertSyncSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) @@ -57,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteBooleanValue(IsEnabled.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAlertSyncSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentCreateOrUpdateContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentCreateOrUpdateContent.Serialization.cs index facd1d6bcc670..ceafc251555a6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentCreateOrUpdateContent.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentCreateOrUpdateContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityAssessmentCreateOrUpdateContent : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(SecurityAssessmentCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceDetails)) @@ -91,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteObjectValue(Status, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAssessmentCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentList.Serialization.cs index ed3f342d41445..79bc952254ba6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityAssessmentList : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SecurityAssessmentList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SecurityAssessmentList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataPartner.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataPartner.Serialization.cs index 4430c6992e5bf..a3053c35137ee 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataPartner.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataPartner.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAssessmentMetadataPartner : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityAssessmentMetadataPartner)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("partnerName"u8); writer.WriteStringValue(PartnerName); if (Optional.IsDefined(ProductName)) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SecurityAssessmentMetadataPartner IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataProperties.Serialization.cs index 4578aa222d1c4..28f915ecef70c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAssessmentMetadataProperties : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SecurityAssessmentMetadataProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("displayName"u8); writer.WriteStringValue(DisplayName); if (options.Format != "W" && Optional.IsDefined(PolicyDefinitionId)) @@ -102,7 +110,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } SecurityAssessmentMetadataProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataResponseList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataResponseList.Serialization.cs index d86f0d08d60db..dbcf00b1f8584 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataResponseList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataResponseList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityAssessmentMetadataResponseList : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(SecurityAssessmentMetadataResponseList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } SecurityAssessmentMetadataResponseList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPartner.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPartner.Serialization.cs index c84bc181d51c4..4e5397a103585 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPartner.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPartner.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAssessmentPartner : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecurityAssessmentPartner)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("partnerName"u8); writer.WriteStringValue(PartnerName); writer.WritePropertyName("secret"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } SecurityAssessmentPartner IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPublishDates.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPublishDates.Serialization.cs index f7a5736aa66e4..0ad64217a113f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPublishDates.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPublishDates.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAssessmentPublishDates : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecurityAssessmentPublishDates)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(GA)) { writer.WritePropertyName("GA"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } SecurityAssessmentPublishDates IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatus.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatus.Serialization.cs index e42ae5385a9ca..1c8a93da957fc 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatus.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAssessmentStatus : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityAssessmentStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("code"u8); writer.WriteStringValue(Code.ToString()); if (Optional.IsDefined(Cause)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SecurityAssessmentStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatusResult.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatusResult.Serialization.cs index 5081eb624f380..cba52e53ea543 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatusResult.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatusResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAssessmentStatusResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecurityAssessmentStatusResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(FirstEvaluatedOn)) { writer.WritePropertyName("firstEvaluationDate"u8); @@ -36,34 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WritePropertyName("statusChangeDate"u8); writer.WriteStringValue(StatusChangeOn.Value, "O"); } - writer.WritePropertyName("code"u8); - writer.WriteStringValue(Code.ToString()); - if (Optional.IsDefined(Cause)) - { - writer.WritePropertyName("cause"u8); - writer.WriteStringValue(Cause); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAssessmentStatusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationAction.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationAction.Serialization.cs index 9d5f34dcc103f..9d919bfb90c4a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationAction.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationAction.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationAction : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityAutomationAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("actionType"u8); writer.WriteStringValue(ActionType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SecurityAutomationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionEventHub.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionEventHub.Serialization.cs index b8b3041bee52b..16b88860a8d8d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionEventHub.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionEventHub.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationActionEventHub : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecurityAutomationActionEventHub)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(EventHubResourceId)) { writer.WritePropertyName("eventHubResourceId"u8); @@ -41,24 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WritePropertyName("connectionString"u8); writer.WriteStringValue(ConnectionString); } - writer.WritePropertyName("actionType"u8); - writer.WriteStringValue(ActionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAutomationActionEventHub IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionLogicApp.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionLogicApp.Serialization.cs index 4a40a22bb6797..5d46d60e3c8b6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionLogicApp.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionLogicApp.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationActionLogicApp : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecurityAutomationActionLogicApp)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(LogicAppResourceId)) { writer.WritePropertyName("logicAppResourceId"u8); @@ -36,24 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WritePropertyName("uri"u8); writer.WriteStringValue(Uri.AbsoluteUri); } - writer.WritePropertyName("actionType"u8); - writer.WriteStringValue(ActionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAutomationActionLogicApp IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionWorkspace.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionWorkspace.Serialization.cs index af3a237c8f85a..1a0d12ba3498d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionWorkspace.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionWorkspace.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationActionWorkspace : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityAutomationActionWorkspace)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(WorkspaceResourceId)) { writer.WritePropertyName("workspaceResourceId"u8); writer.WriteStringValue(WorkspaceResourceId); } - writer.WritePropertyName("actionType"u8); - writer.WriteStringValue(ActionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAutomationActionWorkspace IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationRuleSet.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationRuleSet.Serialization.cs index 715a175cc658a..8b3eceaa0fe99 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationRuleSet.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationRuleSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationRuleSet : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecurityAutomationRuleSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Rules)) { writer.WritePropertyName("rules"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } SecurityAutomationRuleSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationScope.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationScope.Serialization.cs index 75324d0b77ac4..3114ca5c5819d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationScope.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationScope.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationScope : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(SecurityAutomationScope)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } SecurityAutomationScope IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationSource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationSource.Serialization.cs index 60e9a65d3a4a8..2295d9c794306 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationSource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationSource.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationSource : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityAutomationSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EventSource)) { writer.WritePropertyName("eventSource"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SecurityAutomationSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationTriggeringRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationTriggeringRule.Serialization.cs index 9a6a379640a31..982bb6943fdff 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationTriggeringRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationTriggeringRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationTriggeringRule : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecurityAutomationTriggeringRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PropertyJPath)) { writer.WritePropertyName("propertyJPath"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } SecurityAutomationTriggeringRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationValidationStatus.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationValidationStatus.Serialization.cs index 4018d92fed562..3e5a542d8e920 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationValidationStatus.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationValidationStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationValidationStatus : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityAutomationValidationStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsValid)) { writer.WritePropertyName("isValid"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SecurityAutomationValidationStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterAllowedConnection.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterAllowedConnection.Serialization.cs index cc8bcea676a45..65b65a21c9d58 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterAllowedConnection.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterAllowedConnection.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityCenterAllowedConnection : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityCenterAllowedConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CalculatedOn)) @@ -70,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityCenterAllowedConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterCloudOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterCloudOffering.Serialization.cs index fa6b7c20a094d..43e0130f52744 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterCloudOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterCloudOffering.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityCenterCloudOffering : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SecurityCenterCloudOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("offeringType"u8); writer.WriteStringValue(OfferingType.ToString()); if (options.Format != "W" && Optional.IsDefined(Description)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } SecurityCenterCloudOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterFileProtectionMode.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterFileProtectionMode.Serialization.cs index e5769bd204d89..4970dc8d412ed 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterFileProtectionMode.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterFileProtectionMode.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityCenterFileProtectionMode : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecurityCenterFileProtectionMode)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Exe)) { writer.WritePropertyName("exe"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } SecurityCenterFileProtectionMode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterPublisherInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterPublisherInfo.Serialization.cs index 8da0ffaeae25d..e1fed3358adce 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterPublisherInfo.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterPublisherInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityCenterPublisherInfo : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SecurityCenterPublisherInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PublisherName)) { writer.WritePropertyName("publisherName"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } SecurityCenterPublisherInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterResourceDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterResourceDetails.Serialization.cs index ffe5b8d7e4015..b5245566cd8b2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterResourceDetails.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterResourceDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityCenterResourceDetails : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityCenterResourceDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("source"u8); writer.WriteStringValue(Source.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } SecurityCenterResourceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterTagsResourceInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterTagsResourceInfo.Serialization.cs index 75faf0c4f16c5..2342bb8fa0d34 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterTagsResourceInfo.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterTagsResourceInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityCenterTagsResourceInfo : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecurityCenterTagsResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } SecurityCenterTagsResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorEnvironment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorEnvironment.Serialization.cs index 5ed1f3c0ec521..8d3f59323fc3c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorEnvironment.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorEnvironment.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityConnectorEnvironment : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(SecurityConnectorEnvironment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("environmentType"u8); writer.WriteStringValue(EnvironmentType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } SecurityConnectorEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubOwnerProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubOwnerProperties.Serialization.cs index 000ad7013cc8c..34dd212b937ce 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubOwnerProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubOwnerProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityConnectorGitHubOwnerProperties : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(SecurityConnectorGitHubOwnerProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage)) { writer.WritePropertyName("provisioningStatusMessage"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } SecurityConnectorGitHubOwnerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubRepositoryProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubRepositoryProperties.Serialization.cs index 2fbf378bcee88..b0fc0a439e4a9 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubRepositoryProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubRepositoryProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityConnectorGitHubRepositoryProperties : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(SecurityConnectorGitHubRepositoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage)) { writer.WritePropertyName("provisioningStatusMessage"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } SecurityConnectorGitHubRepositoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabGroupProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabGroupProperties.Serialization.cs index 1025a42a9dd1d..feec2a9c3cf46 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabGroupProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabGroupProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityConnectorGitLabGroupProperties : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(SecurityConnectorGitLabGroupProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage)) { writer.WritePropertyName("provisioningStatusMessage"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } SecurityConnectorGitLabGroupProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabProjectProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabProjectProperties.Serialization.cs index 0ccc22fc33133..e3d7e721db4d4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabProjectProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabProjectProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityConnectorGitLabProjectProperties : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(SecurityConnectorGitLabProjectProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage)) { writer.WritePropertyName("provisioningStatusMessage"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } SecurityConnectorGitLabProjectProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorsList.Serialization.cs index 11e630b3e47ee..40180f3dfd017 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorsList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorsList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityConnectorsList : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SecurityConnectorsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SecurityConnectorsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactList.Serialization.cs index de40caba94828..069020b7fd39d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityContactList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SecurityContactList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } SecurityContactList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesAlertNotifications.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesAlertNotifications.Serialization.cs index aa689f0e38e2d..ef4bea84b0857 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesAlertNotifications.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesAlertNotifications.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityContactPropertiesAlertNotifications : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(SecurityContactPropertiesAlertNotifications)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(State)) { writer.WritePropertyName("state"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } SecurityContactPropertiesAlertNotifications IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesNotificationsByRole.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesNotificationsByRole.Serialization.cs index 6c44b173ec463..417945ae1f9ce 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesNotificationsByRole.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesNotificationsByRole.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityContactPropertiesNotificationsByRole : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(SecurityContactPropertiesNotificationsByRole)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(State)) { writer.WritePropertyName("state"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } SecurityContactPropertiesNotificationsByRole IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCve.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCve.Serialization.cs index 844d20533f46e..641a8cb66316b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCve.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCve.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityCve : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(SecurityCve)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Title)) { writer.WritePropertyName("title"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } SecurityCve IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCvss.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCvss.Serialization.cs index bf3eda61c2b44..62103492eec42 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCvss.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCvss.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityCvss : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(SecurityCvss)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Base)) { writer.WritePropertyName("base"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } SecurityCvss IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityHealthReportIssue.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityHealthReportIssue.Serialization.cs index d157039a2daf2..8af5f3dc2a693 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityHealthReportIssue.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityHealthReportIssue.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityHealthReportIssue : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecurityHealthReportIssue)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("issueKey"u8); writer.WriteStringValue(IssueKey); if (Optional.IsDefined(IssueName)) @@ -84,7 +92,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } SecurityHealthReportIssue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityInformationTypeInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityInformationTypeInfo.Serialization.cs index be140ea78b941..349e9fac12a91 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityInformationTypeInfo.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityInformationTypeInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityInformationTypeInfo : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SecurityInformationTypeInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DisplayName)) { writer.WritePropertyName("displayName"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } SecurityInformationTypeInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityOperatorList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityOperatorList.Serialization.cs index 73cac0d9525cb..d5813e3e23c79 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityOperatorList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityOperatorList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityOperatorList : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(SecurityOperatorList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } SecurityOperatorList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolution.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolution.Serialization.cs index 0939d006318d6..e0318be09a937 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolution.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolution.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecuritySolution : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SecuritySolution)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(SecurityFamily)) @@ -75,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(ProtectionStatus); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecuritySolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionList.Serialization.cs index bb10ad59cd160..88c3439a33eb2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecuritySolutionList : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(SecuritySolutionList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } SecuritySolutionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceData.Serialization.cs index 0d470502d09c1..73f32e8fa7cdc 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceData.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecuritySolutionsReferenceData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecuritySolutionsReferenceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("securityFamily"u8); @@ -69,22 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WritePropertyName("template"u8); writer.WriteStringValue(Template); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecuritySolutionsReferenceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceDataList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceDataList.Serialization.cs index 327546da9dd04..71da251f9856b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceDataList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceDataList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecuritySolutionsReferenceDataList : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecuritySolutionsReferenceDataList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SecuritySolutionsReferenceDataList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentAdditionalInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentAdditionalInfo.Serialization.cs index b50d41e976965..796a4d62b2810 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentAdditionalInfo.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentAdditionalInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecuritySubAssessmentAdditionalInfo : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(SecuritySubAssessmentAdditionalInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("assessedResourceType"u8); writer.WriteStringValue(AssessedResourceType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } SecuritySubAssessmentAdditionalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentList.Serialization.cs index 155abe37b20b7..a7c1ed635731f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecuritySubAssessmentList : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecuritySubAssessmentList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } SecuritySubAssessmentList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskList.Serialization.cs index 2ecce4e19ef10..b25b53390f1e6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityTaskList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SecurityTaskList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } SecurityTaskList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskProperties.Serialization.cs index a7f898ec3f0bd..58e905b5a3069 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityTaskProperties : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SecurityTaskProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } #endif } - writer.WriteEndObject(); } SecurityTaskProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTopologyResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTopologyResource.Serialization.cs index 1c24dd154cd70..286a82af981d2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTopologyResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTopologyResource.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityTopologyResource : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityTopologyResource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CalculatedOn)) @@ -70,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityTopologyResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivityLabel.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivityLabel.Serialization.cs index 2fb7be4b6a85c..cab5caa6c8cdf 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivityLabel.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivityLabel.Serialization.cs @@ -18,6 +18,15 @@ public partial class SensitivityLabel : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SensitivityLabel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DisplayName)) { writer.WritePropertyName("displayName"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } SensitivityLabel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingCreateOrUpdateContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingCreateOrUpdateContent.Serialization.cs index 58802ce0f98db..cf773d82b9415 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingCreateOrUpdateContent.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingCreateOrUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class SensitivitySettingCreateOrUpdateContent : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(SensitivitySettingCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("sensitiveInfoTypesIds"u8); writer.WriteStartArray(); foreach (var item in SensitiveInfoTypesIds) @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } SensitivitySettingCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingsProperties.Serialization.cs index 165cec020f4a7..c4c0230720cca 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingsProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingsProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SensitivitySettingsProperties : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SensitivitySettingsProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(SensitiveInfoTypesIds)) { writer.WritePropertyName("sensitiveInfoTypesIds"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } SensitivitySettingsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsList.Serialization.cs index 123143c19b2f4..e9560428a83ad 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServerVulnerabilityAssessmentsList : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ServerVulnerabilityAssessmentsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ServerVulnerabilityAssessmentsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsSettingsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsSettingsList.Serialization.cs index 749c670559f23..7150cc31f89c3 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsSettingsList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsSettingsList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServerVulnerabilityAssessmentsSettingsList : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ServerVulnerabilityAssessmentsSettingsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ServerVulnerabilityAssessmentsSettingsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityProperties.Serialization.cs index 64df3b2ac82ab..e3a66265f2fb2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServerVulnerabilityProperties : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ServerVulnerabilityProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ServerVulnerabilityType)) { writer.WritePropertyName("type"u8); @@ -77,24 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } writer.WriteEndArray(); } - writer.WritePropertyName("assessedResourceType"u8); - writer.WriteStringValue(AssessedResourceType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ServerVulnerabilityProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServicePrincipalProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServicePrincipalProperties.Serialization.cs index 468137d5ec9b9..3f715c412c7f0 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServicePrincipalProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServicePrincipalProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServicePrincipalProperties : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ServicePrincipalProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ApplicationId)) { writer.WritePropertyName("applicationId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ServicePrincipalProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SettingsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SettingsList.Serialization.cs index 3e912b86fb413..51509c6f78c92 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SettingsList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SettingsList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SettingsList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(SettingsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } SettingsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SoftwaresList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SoftwaresList.Serialization.cs index fb99d21f0b814..1935d1e39392d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SoftwaresList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SoftwaresList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SoftwaresList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(SoftwaresList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } SoftwaresList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlServerVulnerabilityProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlServerVulnerabilityProperties.Serialization.cs index 97e145979a1eb..44e4359c1fb41 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlServerVulnerabilityProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlServerVulnerabilityProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SqlServerVulnerabilityProperties : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SqlServerVulnerabilityProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(SqlServerVulnerabilityType)) { writer.WritePropertyName("type"u8); @@ -36,24 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WritePropertyName("query"u8); writer.WriteStringValue(Query); } - writer.WritePropertyName("assessedResourceType"u8); - writer.WriteStringValue(AssessedResourceType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SqlServerVulnerabilityProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaseline.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaseline.Serialization.cs index df4f9bc38fde1..e75dad93663fc 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaseline.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaseline.Serialization.cs @@ -18,6 +18,15 @@ public partial class SqlVulnerabilityAssessmentBaseline : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentBaseline)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(ExpectedResults)) { writer.WritePropertyName("expectedResults"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SqlVulnerabilityAssessmentBaseline IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent.Serialization.cs index 0167223cf4832..ec48daf0e0bb2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Wri throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LatestScan)) { writer.WritePropertyName("latestScan"u8); @@ -66,7 +74,6 @@ void IJsonModel.Wri #endif } } - writer.WriteEndObject(); } SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentRemediation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentRemediation.Serialization.cs index fc67aff7fc3f1..471aefc6358e7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentRemediation.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentRemediation.Serialization.cs @@ -18,6 +18,15 @@ public partial class SqlVulnerabilityAssessmentRemediation : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentRemediation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } SqlVulnerabilityAssessmentRemediation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanProperties.Serialization.cs index af57873563379..17ef8a8d60547 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SqlVulnerabilityAssessmentScanProperties : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentScanProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TriggerType)) { writer.WritePropertyName("triggerType"u8); @@ -116,7 +124,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } SqlVulnerabilityAssessmentScanProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResult.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResult.Serialization.cs index ec2bf76bec975..b20b94ee268c9 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResult.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class SqlVulnerabilityAssessmentScanResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,48 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentScanResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SqlVulnerabilityAssessmentScanResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResultProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResultProperties.Serialization.cs index 4f2479464113f..1a6b1bca6e6b6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResultProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResultProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SqlVulnerabilityAssessmentScanResultProperties : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentScanResultProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RuleId)) { writer.WritePropertyName("ruleId"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } SqlVulnerabilityAssessmentScanResultProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SubAssessmentStatus.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SubAssessmentStatus.Serialization.cs index 688b83eff4e75..e09c14d64a556 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SubAssessmentStatus.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SubAssessmentStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class SubAssessmentStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SubAssessmentStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } SubAssessmentStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScope.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScope.Serialization.cs index c59f4a5a0cd9b..af5804ac4bbd5 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScope.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScope.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SuppressionAlertsScope : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SuppressionAlertsScope)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("allOf"u8); writer.WriteStartArray(); foreach (var item in AllOf) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SuppressionAlertsScope IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScopeElement.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScopeElement.Serialization.cs index af0e32a5b50de..e3f0a937e2ae4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScopeElement.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScopeElement.Serialization.cs @@ -18,6 +18,15 @@ public partial class SuppressionAlertsScopeElement : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SuppressionAlertsScopeElement)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Field)) { writer.WritePropertyName("field"u8); @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } #endif } - writer.WriteEndObject(); } SuppressionAlertsScopeElement IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TargetBranchConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TargetBranchConfiguration.Serialization.cs index 3b4ae02454793..034932a8bcdea 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TargetBranchConfiguration.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TargetBranchConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class TargetBranchConfiguration : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(TargetBranchConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(BranchNames)) { writer.WritePropertyName("branchNames"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } TargetBranchConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ThresholdCustomAlertRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ThresholdCustomAlertRule.Serialization.cs index 3d6ab31dff058..e22235061ce27 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ThresholdCustomAlertRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ThresholdCustomAlertRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ThresholdCustomAlertRule : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,41 +34,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ThresholdCustomAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("minThreshold"u8); writer.WriteNumberValue(MinThreshold); writer.WritePropertyName("maxThreshold"u8); writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ThresholdCustomAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TimeWindowCustomAlertRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TimeWindowCustomAlertRule.Serialization.cs index efbf13a0c9740..19adb007caf86 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TimeWindowCustomAlertRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TimeWindowCustomAlertRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class TimeWindowCustomAlertRule : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(TimeWindowCustomAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("timeWindowSize"u8); writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } TimeWindowCustomAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologyList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologyList.Serialization.cs index 4ac0c27180d3c..c803d101a515d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologyList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologyList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class TopologyList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(TopologyList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } TopologyList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResource.Serialization.cs index 876d6bc6da83f..1ce607fda9f27 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResource.Serialization.cs @@ -18,6 +18,15 @@ public partial class TopologySingleResource : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(TopologySingleResource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } TopologySingleResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceChild.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceChild.Serialization.cs index 893a2224dbb05..61aea8a4ef616 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceChild.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceChild.Serialization.cs @@ -18,6 +18,15 @@ public partial class TopologySingleResourceChild : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(TopologySingleResourceChild)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } TopologySingleResourceChild IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceParent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceParent.Serialization.cs index 8f45af791be0e..dbe8dae21cbf6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceParent.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceParent.Serialization.cs @@ -18,6 +18,15 @@ public partial class TopologySingleResourceParent : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(TopologySingleResourceParent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } TopologySingleResourceParent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TwinUpdatesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TwinUpdatesNotInAllowedRange.Serialization.cs index 61361f911568b..8f3bf02d7170a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TwinUpdatesNotInAllowedRange.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TwinUpdatesNotInAllowedRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class TwinUpdatesNotInAllowedRange : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(TwinUpdatesNotInAllowedRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("timeWindowSize"u8); - writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } TwinUpdatesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnauthorizedOperationsNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnauthorizedOperationsNotInAllowedRange.Serialization.cs index 0479808354330..0feb9a81940f1 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnauthorizedOperationsNotInAllowedRange.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnauthorizedOperationsNotInAllowedRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class UnauthorizedOperationsNotInAllowedRange : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(UnauthorizedOperationsNotInAllowedRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("timeWindowSize"u8); - writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } UnauthorizedOperationsNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAdditionalData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAdditionalData.Serialization.cs index 25cfa7aa52c29..8c58c3132b295 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAdditionalData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAdditionalData.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownAdditionalData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(SecuritySubAssessmentAdditionalInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("assessedResourceType"u8); - writer.WriteStringValue(AssessedResourceType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SecuritySubAssessmentAdditionalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertResourceIdentifier.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertResourceIdentifier.Serialization.cs index 2ebd2766eba84..15050a09deb69 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertResourceIdentifier.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertResourceIdentifier.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownAlertResourceIdentifier : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityAlertResourceIdentifier)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceIdentifierType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SecurityAlertResourceIdentifier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertSimulatorRequestProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertSimulatorRequestProperties.Serialization.cs index de93c0ab260cf..ded969cbfbe22 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertSimulatorRequestProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertSimulatorRequestProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownAlertSimulatorRequestProperties : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(SecurityAlertSimulatorRequestProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -40,7 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter wr } #endif } - writer.WriteEndObject(); } SecurityAlertSimulatorRequestProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAuthenticationDetailsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAuthenticationDetailsProperties.Serialization.cs index 9803a310689e0..ae935d6507eb0 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAuthenticationDetailsProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAuthenticationDetailsProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownAuthenticationDetailsProperties : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,40 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(AuthenticationDetailsProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(AuthenticationProvisioningState)) - { - writer.WritePropertyName("authenticationProvisioningState"u8); - writer.WriteStringValue(AuthenticationProvisioningState.Value.ToString()); - } - if (options.Format != "W" && Optional.IsCollectionDefined(GrantedPermissions)) - { - writer.WritePropertyName("grantedPermissions"u8); - writer.WriteStartArray(); - foreach (var item in GrantedPermissions) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } AuthenticationDetailsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAutomationAction.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAutomationAction.Serialization.cs index a5cfaac358889..23aa726010fc8 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAutomationAction.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAutomationAction.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownAutomationAction : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityAutomationAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("actionType"u8); - writer.WriteStringValue(ActionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SecurityAutomationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAwsOrganizationalData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAwsOrganizationalData.Serialization.cs index fb3a277d317b4..3a18db2136ae3 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAwsOrganizationalData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAwsOrganizationalData.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownAwsOrganizationalData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(AwsOrganizationalInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("organizationMembershipType"u8); - writer.WriteStringValue(OrganizationMembershipType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } AwsOrganizationalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCloudOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCloudOffering.Serialization.cs index 6f155aaa5bb0a..4840036496a08 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCloudOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCloudOffering.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownCloudOffering : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SecurityCenterCloudOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("offeringType"u8); - writer.WriteStringValue(OfferingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SecurityCenterCloudOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCustomAlertRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCustomAlertRule.Serialization.cs index 0f09454cacc47..c5fc5f0f39d0d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCustomAlertRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCustomAlertRule.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownCustomAlertRule : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,37 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(CustomAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } CustomAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownEnvironmentData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownEnvironmentData.Serialization.cs index dbd973a725e2d..522e02e7d3f05 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownEnvironmentData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownEnvironmentData.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownEnvironmentData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(SecurityConnectorEnvironment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("environmentType"u8); - writer.WriteStringValue(EnvironmentType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SecurityConnectorEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownExternalSecuritySolution.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownExternalSecuritySolution.Serialization.cs index bcafcf814e1f6..cb357c898ca6d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownExternalSecuritySolution.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownExternalSecuritySolution.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownExternalSecuritySolution : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,57 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ExternalSecuritySolution)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Kind != null) - { - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.Value.ToString()); - } - else - { - writer.WriteNull("kind"); - } - if (options.Format != "W" && Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ExternalSecuritySolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownGcpOrganizationalData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownGcpOrganizationalData.Serialization.cs index 43154fb5b65b2..1d2c4b7763efe 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownGcpOrganizationalData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownGcpOrganizationalData.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownGcpOrganizationalData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(GcpOrganizationalInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("organizationMembershipType"u8); - writer.WriteStringValue(OrganizationMembershipType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } GcpOrganizationalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownResourceDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownResourceDetails.Serialization.cs index 4b3fca68d2908..f89f0ea25b46a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownResourceDetails.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownResourceDetails.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownResourceDetails : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityCenterResourceDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("source"u8); - writer.WriteStringValue(Source.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SecurityCenterResourceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownServerVulnerabilityAssessmentsSetting.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownServerVulnerabilityAssessmentsSetting.Serialization.cs index 3772843fc0042..c25e0f1745a74 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownServerVulnerabilityAssessmentsSetting.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownServerVulnerabilityAssessmentsSetting.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownServerVulnerabilityAssessmentsSetting : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,45 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ServerVulnerabilityAssessmentsSettingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ServerVulnerabilityAssessmentsSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownSetting.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownSetting.Serialization.cs index ec1b57c227558..c2b92db34f0a3 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownSetting.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownSetting.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownSetting : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,45 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SecuritySettingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SecuritySettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedInformationType.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedInformationType.Serialization.cs index c535c603ccfb3..f85391c4da6a6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedInformationType.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedInformationType.Serialization.cs @@ -18,6 +18,15 @@ public partial class UserDefinedInformationType : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(UserDefinedInformationType)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } UserDefinedInformationType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedResourcesProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedResourcesProperties.Serialization.cs index 4cb86d88b885a..d642de289e8ad 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedResourcesProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedResourcesProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class UserDefinedResourcesProperties : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(UserDefinedResourcesProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Query != null) { writer.WritePropertyName("query"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } UserDefinedResourcesProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserRecommendation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserRecommendation.Serialization.cs index a272c473a624d..ecb056fdd7b9b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserRecommendation.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserRecommendation.Serialization.cs @@ -18,6 +18,15 @@ public partial class UserRecommendation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(UserRecommendation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Username)) { writer.WritePropertyName("username"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } UserRecommendation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VendorReference.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VendorReference.Serialization.cs index 7225bb8c44c3c..183713770c8b4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VendorReference.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VendorReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class VendorReference : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(VendorReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Title)) { writer.WritePropertyName("title"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } VendorReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VmRecommendation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VmRecommendation.Serialization.cs index d8aada761fee8..f8828f0c4d936 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VmRecommendation.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VmRecommendation.Serialization.cs @@ -18,6 +18,15 @@ public partial class VmRecommendation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(VmRecommendation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ConfigurationStatus)) { writer.WritePropertyName("configurationStatus"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } VmRecommendation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRule.Serialization.cs index 36594955c8920..c187cf78636da 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class VulnerabilityAssessmentRule : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VulnerabilityAssessmentRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RuleId)) { writer.WritePropertyName("ruleId"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } VulnerabilityAssessmentRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRuleQueryCheck.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRuleQueryCheck.Serialization.cs index 849f55fab94ce..0ab1b27b39040 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRuleQueryCheck.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRuleQueryCheck.Serialization.cs @@ -18,6 +18,15 @@ public partial class VulnerabilityAssessmentRuleQueryCheck : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(VulnerabilityAssessmentRuleQueryCheck)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Query)) { writer.WritePropertyName("query"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } VulnerabilityAssessmentRuleQueryCheck IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/WorkspaceSettingList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/WorkspaceSettingList.Serialization.cs index 4352ed8433171..679401f6233cd 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/WorkspaceSettingList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/WorkspaceSettingList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class WorkspaceSettingList : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(WorkspaceSettingList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } WorkspaceSettingList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceAssessmentData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceAssessmentData.Serialization.cs index aff65dfe84df8..ca58977daea24 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceAssessmentData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceAssessmentData.Serialization.cs @@ -20,6 +20,15 @@ public partial class RegulatoryComplianceAssessmentData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(RegulatoryComplianceAssessmentData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Description)) @@ -91,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNumberValue(UnsupportedResources.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RegulatoryComplianceAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceControlData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceControlData.Serialization.cs index 8413d84939425..6e7b53658196f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceControlData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceControlData.Serialization.cs @@ -20,6 +20,15 @@ public partial class RegulatoryComplianceControlData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(RegulatoryComplianceControlData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Description)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteNumberValue(SkippedAssessments.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RegulatoryComplianceControlData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceStandardData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceStandardData.Serialization.cs index 7bbb529abc510..b656526cadea6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceStandardData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceStandardData.Serialization.cs @@ -20,6 +20,15 @@ public partial class RegulatoryComplianceStandardData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(RegulatoryComplianceStandardData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(State)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteNumberValue(UnsupportedControls.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RegulatoryComplianceStandardData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecureScoreData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecureScoreData.Serialization.cs index d1978a71e81e5..799393c4e8009 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecureScoreData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecureScoreData.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecureScoreData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(SecureScoreData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayName)) @@ -78,22 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO } writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecureScoreData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertData.Serialization.cs index 9c47dfa012e81..09bd4903b6944 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityAlertData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(SecurityAlertData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Version)) @@ -233,22 +222,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteObjectValue(SupportingEvidence, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertsSuppressionRuleData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertsSuppressionRuleData.Serialization.cs index e235314b976b8..7b7eb5c41e29f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertsSuppressionRuleData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertsSuppressionRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityAlertsSuppressionRuleData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityAlertsSuppressionRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AlertType)) @@ -86,22 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteObjectValue(SuppressionAlertsScope, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAlertsSuppressionRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityApplicationData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityApplicationData.Serialization.cs index 492f7a119dea0..5ab790c5c6a16 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityApplicationData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityApplicationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityApplicationData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(SecurityApplicationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DisplayName)) @@ -88,22 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentData.Serialization.cs index 37ec65dde23b0..d7542aadbae79 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityAssessmentData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SecurityAssessmentData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceDetails)) @@ -92,22 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteObjectValue(Status, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentMetadataData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentMetadataData.Serialization.cs index 862d5ee607b54..4974f8f694ac7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentMetadataData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentMetadataData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityAssessmentMetadataData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecurityAssessmentMetadataData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DisplayName)) @@ -151,22 +140,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAssessmentMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAutomationData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAutomationData.Serialization.cs index aa5817d5a82a3..9eaca93597763 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAutomationData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAutomationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityAutomationData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SecurityAutomationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Kind)) { writer.WritePropertyName("kind"u8); @@ -38,39 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -114,22 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAutomationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterApiCollectionData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterApiCollectionData.Serialization.cs index bbbb9f57cc223..00484ae48d13c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterApiCollectionData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterApiCollectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityCenterApiCollectionData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityCenterApiCollectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -101,22 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteStringValue(SensitivityLabel); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityCenterApiCollectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterLocationData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterLocationData.Serialization.cs index 1858f14ca00b0..f96c2e7aa2341 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterLocationData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterLocationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityCenterLocationData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(SecurityCenterLocationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -39,42 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } #endif } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityCenterLocationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterPricingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterPricingData.Serialization.cs index 92230caa7558f..ef37b97a7ac4b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterPricingData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterPricingData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityCenterPricingData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecurityCenterPricingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PricingTier)) @@ -96,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityCenterPricingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCloudConnectorData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCloudConnectorData.Serialization.cs index a07708bda15e8..c21faca516477 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCloudConnectorData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCloudConnectorData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityCloudConnectorData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(SecurityCloudConnectorData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(HybridComputeSettings)) @@ -61,22 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteObjectValue(AuthenticationDetails, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityCloudConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityComplianceData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityComplianceData.Serialization.cs index 3d8a8898b064a..c6da4e5ec9f7e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityComplianceData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityComplianceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityComplianceData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SecurityComplianceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AssessedOn)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityComplianceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorData.Serialization.cs index 1b6faefbfd7b1..c6f8c157cd8f7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityConnectorData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(SecurityConnectorData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Kind)) { writer.WritePropertyName("kind"u8); @@ -38,39 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(HierarchyIdentifier)) @@ -104,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteObjectValue(EnvironmentData, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerData.Serialization.cs index f6b972e73e689..d948d003f2723 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityConnectorGitHubOwnerData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecurityConnectorGitHubOwnerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityConnectorGitHubOwnerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryData.Serialization.cs index 22dc13cfdc90d..2cb78ebef387c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityConnectorGitHubRepositoryData : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(SecurityConnectorGitHubRepositoryData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityConnectorGitHubRepositoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupData.Serialization.cs index 09893b8e4f6cb..72e3ff696fec1 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityConnectorGitLabGroupData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecurityConnectorGitLabGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityConnectorGitLabGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectData.Serialization.cs index db9d3d306df91..aa9c3411ecd47 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityConnectorGitLabProjectData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityConnectorGitLabProjectData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityConnectorGitLabProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityContactData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityContactData.Serialization.cs index 9d3dc635b6e15..02b24ae554745 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityContactData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityContactData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityContactData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SecurityContactData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Emails)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(NotificationsByRole, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityContactData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityHealthReportData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityHealthReportData.Serialization.cs index 7592ff7a7bbfa..5f062b7afc40b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityHealthReportData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityHealthReportData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityHealthReportData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityHealthReportData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceDetails)) @@ -112,22 +101,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityHealthReportData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityOperatorData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityOperatorData.Serialization.cs index 33d643778fa09..a2ad4291d6de6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityOperatorData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityOperatorData.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityOperatorData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,48 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(SecurityOperatorData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityOperatorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySettingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySettingData.Serialization.cs index ecafdbb4270b4..62a3b18788ccc 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySettingData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySettingData.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecuritySettingData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,45 +34,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SecuritySettingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecuritySettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySubAssessmentData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySubAssessmentData.Serialization.cs index f3ff7f946ef09..a002b8188aaf7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySubAssessmentData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySubAssessmentData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecuritySubAssessmentData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecuritySubAssessmentData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(VulnerabilityId)) @@ -101,22 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteObjectValue(AdditionalData, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecuritySubAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityTaskData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityTaskData.Serialization.cs index 7ae4077199d66..3bff32bfd9cfc 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityTaskData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityTaskData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityTaskData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SecurityTaskData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(State)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(SubState); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityTaskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityWorkspaceSettingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityWorkspaceSettingData.Serialization.cs index d6d0a31300d1f..a47bc20922c0b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityWorkspaceSettingData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityWorkspaceSettingData.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityWorkspaceSettingData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(SecurityWorkspaceSettingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(WorkspaceId)) @@ -60,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(Scope); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityWorkspaceSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SensitivitySettingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SensitivitySettingData.Serialization.cs index d8a77031144f8..4c234a7d21ec0 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SensitivitySettingData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SensitivitySettingData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SensitivitySettingData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SensitivitySettingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SensitivitySettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentData.Serialization.cs index e5086aa859578..675bc5dbc7dcd 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ServerVulnerabilityAssessmentData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ServerVulnerabilityAssessmentData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -56,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ServerVulnerabilityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentsSettingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentsSettingData.Serialization.cs index 742643ac5683a..b1bef48d9bba6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentsSettingData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentsSettingData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ServerVulnerabilityAssessmentsSettingData : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,45 +35,9 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ServerVulnerabilityAssessmentsSettingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ServerVulnerabilityAssessmentsSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SoftwareInventoryData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SoftwareInventoryData.Serialization.cs index ddafe9efd7b66..a657293a1b1a7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SoftwareInventoryData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SoftwareInventoryData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SoftwareInventoryData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(SoftwareInventoryData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DeviceId)) @@ -96,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(FirstSeenOn.Value, "O"); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SoftwareInventoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentBaselineRuleData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentBaselineRuleData.Serialization.cs index f9adab4aee470..a958dc39cde06 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentBaselineRuleData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentBaselineRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SqlVulnerabilityAssessmentBaselineRuleData : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentBaselineRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SqlVulnerabilityAssessmentBaselineRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentScanData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentScanData.Serialization.cs index 4afbbd5626eda..4fbf494335b55 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentScanData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentScanData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SqlVulnerabilityAssessmentScanData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentScanData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SqlVulnerabilityAssessmentScanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/autorest.md b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/autorest.md index a897795fec590..f3f3748130fd3 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/autorest.md +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/autorest.md @@ -25,6 +25,7 @@ modelerfour: flatten-payloads: false lenient-model-deduplication: true use-model-reader-writer: true +use-write-core: true deserialize-null-collection-as-null-value: true #mgmt-debug: